watchdog: s3c2410_wdt: Use module_platform_driver()
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 12 Jul 2012 11:47:40 +0000 (17:17 +0530)
committerWim Van Sebroeck <wim@iguana.be>
Mon, 23 Jul 2012 10:50:51 +0000 (12:50 +0200)
module_platform_driver() replaces module_init() and module_exit()
and makes the code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/s3c2410_wdt.c

index 200ece5e2a22adb0d18279af33a83f2458d3ece4..9245b4d23bfe79ead0116c440fb6f4803fa23221 100644 (file)
@@ -519,21 +519,7 @@ static struct platform_driver s3c2410wdt_driver = {
        },
 };
 
-
-static int __init watchdog_init(void)
-{
-       pr_info("S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics\n");
-
-       return platform_driver_register(&s3c2410wdt_driver);
-}
-
-static void __exit watchdog_exit(void)
-{
-       platform_driver_unregister(&s3c2410wdt_driver);
-}
-
-module_init(watchdog_init);
-module_exit(watchdog_exit);
+module_platform_driver(s3c2410wdt_driver);
 
 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>, "
              "Dimitry Andric <dimitry.andric@tomtom.com>");