diff options
Diffstat (limited to 'drivers/watchdog/nuc900_wdt.c')
-rw-r--r-- | drivers/watchdog/nuc900_wdt.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c index 6cee33d4b16..529085b8b8f 100644 --- a/drivers/watchdog/nuc900_wdt.c +++ b/drivers/watchdog/nuc900_wdt.c @@ -72,7 +72,7 @@ struct nuc900_wdt { }; static unsigned long nuc900wdt_busy; -struct nuc900_wdt *nuc900_wdt; +static struct nuc900_wdt *nuc900_wdt; static inline void nuc900_wdt_keepalive(void) { @@ -287,7 +287,8 @@ static int __devinit nuc900wdt_probe(struct platform_device *pdev) setup_timer(&nuc900_wdt->timer, nuc900_wdt_timer_ping, 0); - if (misc_register(&nuc900wdt_miscdev)) { + ret = misc_register(&nuc900wdt_miscdev); + if (ret) { dev_err(&pdev->dev, "err register miscdev on minor=%d (%d)\n", WATCHDOG_MINOR, ret); goto err_clk; @@ -334,18 +335,7 @@ static struct platform_driver nuc900wdt_driver = { }, }; -static int __init nuc900_wdt_init(void) -{ - return platform_driver_register(&nuc900wdt_driver); -} - -static void __exit nuc900_wdt_exit(void) -{ - platform_driver_unregister(&nuc900wdt_driver); -} - -module_init(nuc900_wdt_init); -module_exit(nuc900_wdt_exit); +module_platform_driver(nuc900wdt_driver); MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); MODULE_DESCRIPTION("Watchdog driver for NUC900"); |