watchdog: convert drivers/watchdog/* to use module_platform_driver_probe
authorFabio Porcedda <fabio.porcedda@gmail.com>
Wed, 9 Jan 2013 11:15:27 +0000 (12:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 01:39:33 +0000 (17:39 -0800)
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>
drivers/watchdog/at32ap700x_wdt.c
drivers/watchdog/at91sam9_wdt.c
drivers/watchdog/coh901327_wdt.c
drivers/watchdog/imx2_wdt.c
drivers/watchdog/txx9wdt.c

index 2896430ce42ca2f7a304fc7da1200c9ea6c3f7e6..7a715e3e6828ee2ede8b80676860d3fc6d280e22 100644 (file)
@@ -436,17 +436,7 @@ static struct platform_driver at32_wdt_driver = {
        .shutdown       = at32_wdt_shutdown,
 };
 
-static int __init at32_wdt_init(void)
-{
-       return platform_driver_probe(&at32_wdt_driver, at32_wdt_probe);
-}
-module_init(at32_wdt_init);
-
-static void __exit at32_wdt_exit(void)
-{
-       platform_driver_unregister(&at32_wdt_driver);
-}
-module_exit(at32_wdt_exit);
+module_platform_driver_probe(at32_wdt_driver, at32_wdt_probe);
 
 MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
 MODULE_DESCRIPTION("Watchdog driver for Atmel AT32AP700X");
index dc42e44b6bc1130516f67554ee6ff1675d8f739c..c08933cc565e19c2b73ec9b9824a55d7aa983071 100644 (file)
@@ -321,18 +321,7 @@ static struct platform_driver at91wdt_driver = {
        },
 };
 
-static int __init at91sam_wdt_init(void)
-{
-       return platform_driver_probe(&at91wdt_driver, at91wdt_probe);
-}
-
-static void __exit at91sam_wdt_exit(void)
-{
-       platform_driver_unregister(&at91wdt_driver);
-}
-
-module_init(at91sam_wdt_init);
-module_exit(at91sam_wdt_exit);
+module_platform_driver_probe(at91wdt_driver, at91wdt_probe);
 
 MODULE_AUTHOR("Renaud CERRATO <r.cerrato@til-technologies.fr>");
 MODULE_DESCRIPTION("Watchdog driver for Atmel AT91SAM9x processors");
index cb5da5c3ece28c34e0cacc23a397dfe74439954d..b9b8a8be6f125740e1ea70eaaf0f9e249559b845 100644 (file)
@@ -451,17 +451,7 @@ static struct platform_driver coh901327_driver = {
        .resume         = coh901327_resume,
 };
 
-static int __init coh901327_init(void)
-{
-       return platform_driver_probe(&coh901327_driver, coh901327_probe);
-}
-module_init(coh901327_init);
-
-static void __exit coh901327_exit(void)
-{
-       platform_driver_unregister(&coh901327_driver);
-}
-module_exit(coh901327_exit);
+module_platform_driver_probe(coh901327_driver, coh901327_probe);
 
 MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>");
 MODULE_DESCRIPTION("COH 901 327 Watchdog");
index 9a45d0294cf48f21397f43909680f2f9349c6d86..bc17decc855177818dae5d1748bfb0ac572ed040 100644 (file)
@@ -342,17 +342,7 @@ static struct platform_driver imx2_wdt_driver = {
        },
 };
 
-static int __init imx2_wdt_init(void)
-{
-       return platform_driver_probe(&imx2_wdt_driver, imx2_wdt_probe);
-}
-module_init(imx2_wdt_init);
-
-static void __exit imx2_wdt_exit(void)
-{
-       platform_driver_unregister(&imx2_wdt_driver);
-}
-module_exit(imx2_wdt_exit);
+module_platform_driver_probe(imx2_wdt_driver, imx2_wdt_probe);
 
 MODULE_AUTHOR("Wolfram Sang");
 MODULE_DESCRIPTION("Watchdog driver for IMX2 and later");
index 98e16373e6404954cf1f955a8aebbe9ecae1a5d7..b04c92b1d71aa51c8fb7ac332fd94a3074c5be06 100644 (file)
@@ -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");