diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-08-14 13:35:19 (GMT) |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-12-19 21:24:38 (GMT) |
commit | 8157becf8db0c798e1260f3af7c495a9b88e3b57 (patch) | |
tree | 382ff887e491a7f752efed70f2a7727e99391bae /drivers/watchdog | |
parent | 2f0bf92513be58d2d65c0a4cc05c5779a7cd81e1 (diff) | |
download | linux-8157becf8db0c798e1260f3af7c495a9b88e3b57.tar.xz |
watchdog: ath79_wdt: convert to use module_platform_driver
This makes the code a bit smaller by getting rid of
some boilerplate code.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/ath79_wdt.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c index 7c8ede7..38a999e 100644 --- a/drivers/watchdog/ath79_wdt.c +++ b/drivers/watchdog/ath79_wdt.c @@ -284,6 +284,7 @@ static void ath97_wdt_shutdown(struct platform_device *pdev) } static struct platform_driver ath79_wdt_driver = { + .probe = ath79_wdt_probe, .remove = ath79_wdt_remove, .shutdown = ath97_wdt_shutdown, .driver = { @@ -292,17 +293,7 @@ static struct platform_driver ath79_wdt_driver = { }, }; -static int __init ath79_wdt_init(void) -{ - return platform_driver_probe(&ath79_wdt_driver, ath79_wdt_probe); -} -module_init(ath79_wdt_init); - -static void __exit ath79_wdt_exit(void) -{ - platform_driver_unregister(&ath79_wdt_driver); -} -module_exit(ath79_wdt_exit); +module_platform_driver(ath79_wdt_driver); MODULE_DESCRIPTION("Atheros AR71XX/AR724X/AR913X hardware watchdog driver"); MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org"); |