mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] watchdog: Convert Wolfson drivers to module_platform_driver
@ 2011-11-23 15:22 Mark Brown
  2011-11-29  9:09 ` Wim Van Sebroeck
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-11-23 15:22 UTC (permalink / raw)
  To: Wim Van Sebroeck; +Cc: linux-watchdog, linux-kernel, patches, Mark Brown

Factors out some boilerplate code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/watchdog/wm831x_wdt.c |   12 +-----------
 drivers/watchdog/wm8350_wdt.c |   12 +-----------
 2 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/drivers/watchdog/wm831x_wdt.c b/drivers/watchdog/wm831x_wdt.c
index e789a47..beb3ad2 100644
--- a/drivers/watchdog/wm831x_wdt.c
+++ b/drivers/watchdog/wm831x_wdt.c
@@ -320,17 +320,7 @@ static struct platform_driver wm831x_wdt_driver = {
 	},
 };
 
-static int __init wm831x_wdt_init(void)
-{
-	return platform_driver_register(&wm831x_wdt_driver);
-}
-module_init(wm831x_wdt_init);
-
-static void __exit wm831x_wdt_exit(void)
-{
-	platform_driver_unregister(&wm831x_wdt_driver);
-}
-module_exit(wm831x_wdt_exit);
+module_platform_driver(wm831x_wdt_driver);
 
 MODULE_AUTHOR("Mark Brown");
 MODULE_DESCRIPTION("WM831x Watchdog");
diff --git a/drivers/watchdog/wm8350_wdt.c b/drivers/watchdog/wm8350_wdt.c
index b68d928..909c786 100644
--- a/drivers/watchdog/wm8350_wdt.c
+++ b/drivers/watchdog/wm8350_wdt.c
@@ -311,17 +311,7 @@ static struct platform_driver wm8350_wdt_driver = {
 	},
 };
 
-static int __init wm8350_wdt_init(void)
-{
-	return platform_driver_register(&wm8350_wdt_driver);
-}
-module_init(wm8350_wdt_init);
-
-static void __exit wm8350_wdt_exit(void)
-{
-	platform_driver_unregister(&wm8350_wdt_driver);
-}
-module_exit(wm8350_wdt_exit);
+module_platform_driver(wm8350_wdt_driver);
 
 MODULE_AUTHOR("Mark Brown");
 MODULE_DESCRIPTION("WM8350 Watchdog");
-- 
1.7.7.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] watchdog: Convert Wolfson drivers to module_platform_driver
  2011-11-23 15:22 [PATCH] watchdog: Convert Wolfson drivers to module_platform_driver Mark Brown
@ 2011-11-29  9:09 ` Wim Van Sebroeck
  0 siblings, 0 replies; 2+ messages in thread
From: Wim Van Sebroeck @ 2011-11-29  9:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-watchdog, linux-kernel, patches

Hi Marc,

> Factors out some boilerplate code.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Added to the linux-next branch of the watchdog git tree.

Kind regards,
Wim.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-29  9:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-23 15:22 [PATCH] watchdog: Convert Wolfson drivers to module_platform_driver Mark Brown
2011-11-29  9:09 ` Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®