aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorFabio Porcedda <fabio.porcedda@gmail.com>2013-01-09 06:15:27 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 20:39:33 -0500
commit1cb9204cc6e22ec18e62ab0687e2240cbdb15200 (patch)
tree1b7e4ef6521f87012818ed3bee5106db2aec48e4 /drivers/watchdog
parentbab734fcdf2c690371e6749ce484b17653b3cb0e (diff)
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')
-rw-r--r--drivers/watchdog/at32ap700x_wdt.c12
-rw-r--r--drivers/watchdog/at91sam9_wdt.c13
-rw-r--r--drivers/watchdog/coh901327_wdt.c12
-rw-r--r--drivers/watchdog/imx2_wdt.c12
-rw-r--r--drivers/watchdog/txx9wdt.c13
5 files changed, 5 insertions, 57 deletions
diff --git a/drivers/watchdog/at32ap700x_wdt.c b/drivers/watchdog/at32ap700x_wdt.c
index 2896430ce42c..7a715e3e6828 100644
--- a/drivers/watchdog/at32ap700x_wdt.c
+++ b/drivers/watchdog/at32ap700x_wdt.c
@@ -436,17 +436,7 @@ static struct platform_driver at32_wdt_driver = {
436 .shutdown = at32_wdt_shutdown, 436 .shutdown = at32_wdt_shutdown,
437}; 437};
438 438
439static int __init at32_wdt_init(void) 439module_platform_driver_probe(at32_wdt_driver, at32_wdt_probe);
440{
441 return platform_driver_probe(&at32_wdt_driver, at32_wdt_probe);
442}
443module_init(at32_wdt_init);
444
445static void __exit at32_wdt_exit(void)
446{
447 platform_driver_unregister(&at32_wdt_driver);
448}
449module_exit(at32_wdt_exit);
450 440
451MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); 441MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
452MODULE_DESCRIPTION("Watchdog driver for Atmel AT32AP700X"); 442MODULE_DESCRIPTION("Watchdog driver for Atmel AT32AP700X");
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index dc42e44b6bc1..c08933cc565e 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -321,18 +321,7 @@ static struct platform_driver at91wdt_driver = {
321 }, 321 },
322}; 322};
323 323
324static int __init at91sam_wdt_init(void) 324module_platform_driver_probe(at91wdt_driver, at91wdt_probe);
325{
326 return platform_driver_probe(&at91wdt_driver, at91wdt_probe);
327}
328
329static void __exit at91sam_wdt_exit(void)
330{
331 platform_driver_unregister(&at91wdt_driver);
332}
333
334module_init(at91sam_wdt_init);
335module_exit(at91sam_wdt_exit);
336 325
337MODULE_AUTHOR("Renaud CERRATO <r.cerrato@til-technologies.fr>"); 326MODULE_AUTHOR("Renaud CERRATO <r.cerrato@til-technologies.fr>");
338MODULE_DESCRIPTION("Watchdog driver for Atmel AT91SAM9x processors"); 327MODULE_DESCRIPTION("Watchdog driver for Atmel AT91SAM9x processors");
diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
index cb5da5c3ece2..b9b8a8be6f12 100644
--- a/drivers/watchdog/coh901327_wdt.c
+++ b/drivers/watchdog/coh901327_wdt.c
@@ -451,17 +451,7 @@ static struct platform_driver coh901327_driver = {
451 .resume = coh901327_resume, 451 .resume = coh901327_resume,
452}; 452};
453 453
454static int __init coh901327_init(void) 454module_platform_driver_probe(coh901327_driver, coh901327_probe);
455{
456 return platform_driver_probe(&coh901327_driver, coh901327_probe);
457}
458module_init(coh901327_init);
459
460static void __exit coh901327_exit(void)
461{
462 platform_driver_unregister(&coh901327_driver);
463}
464module_exit(coh901327_exit);
465 455
466MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>"); 456MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>");
467MODULE_DESCRIPTION("COH 901 327 Watchdog"); 457MODULE_DESCRIPTION("COH 901 327 Watchdog");
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 9a45d0294cf4..bc17decc8551 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -342,17 +342,7 @@ static struct platform_driver imx2_wdt_driver = {
342 }, 342 },
343}; 343};
344 344
345static int __init imx2_wdt_init(void) 345module_platform_driver_probe(imx2_wdt_driver, imx2_wdt_probe);
346{
347 return platform_driver_probe(&imx2_wdt_driver, imx2_wdt_probe);
348}
349module_init(imx2_wdt_init);
350
351static void __exit imx2_wdt_exit(void)
352{
353 platform_driver_unregister(&imx2_wdt_driver);
354}
355module_exit(imx2_wdt_exit);
356 346
357MODULE_AUTHOR("Wolfram Sang"); 347MODULE_AUTHOR("Wolfram Sang");
358MODULE_DESCRIPTION("Watchdog driver for IMX2 and later"); 348MODULE_DESCRIPTION("Watchdog driver for IMX2 and later");
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 = {
172 }, 172 },
173}; 173};
174 174
175static int __init watchdog_init(void) 175module_platform_driver_probe(txx9wdt_driver, txx9wdt_probe);
176{
177 return platform_driver_probe(&txx9wdt_driver, txx9wdt_probe);
178}
179
180static void __exit watchdog_exit(void)
181{
182 platform_driver_unregister(&txx9wdt_driver);
183}
184
185module_init(watchdog_init);
186module_exit(watchdog_exit);
187 176
188MODULE_DESCRIPTION("TXx9 Watchdog Driver"); 177MODULE_DESCRIPTION("TXx9 Watchdog Driver");
189MODULE_LICENSE("GPL"); 178MODULE_LICENSE("GPL");