summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/txx9wdt.c
diff options
context:
space:
mode:
authorFabio Porcedda <fabio.porcedda@gmail.com>2013-01-09 12:15:27 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 17:39:33 -0800
commit1cb9204cc6e22ec18e62ab0687e2240cbdb15200 (patch)
tree1b7e4ef6521f87012818ed3bee5106db2aec48e4 /drivers/watchdog/txx9wdt.c
parentbab734fcdf2c690371e6749ce484b17653b3cb0e (diff)
downloadlinux-1cb9204cc6e22ec18e62ab0687e2240cbdb15200.tar.gz
linux-1cb9204cc6e22ec18e62ab0687e2240cbdb15200.tar.bz2
linux-1cb9204cc6e22ec18e62ab0687e2240cbdb15200.zip
watchdog: convert drivers/watchdog/* to use module_platform_driver_probe
This makes the code a bit smaller by getting rid of some boilerplate code. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/watchdog/txx9wdt.c')
-rw-r--r--drivers/watchdog/txx9wdt.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c
index 98e16373e640..b04c92b1d71a 100644
--- a/drivers/watchdog/txx9wdt.c
+++ b/drivers/watchdog/txx9wdt.c
@@ -172,18 +172,7 @@ static struct platform_driver txx9wdt_driver = {
},
};
-static int __init watchdog_init(void)
-{
- return platform_driver_probe(&txx9wdt_driver, txx9wdt_probe);
-}
-
-static void __exit watchdog_exit(void)
-{
- platform_driver_unregister(&txx9wdt_driver);
-}
-
-module_init(watchdog_init);
-module_exit(watchdog_exit);
+module_platform_driver_probe(txx9wdt_driver, txx9wdt_probe);
MODULE_DESCRIPTION("TXx9 Watchdog Driver");
MODULE_LICENSE("GPL");