]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/rtc/rtc-twl.c: cleanup with module_platform_driver() conversion
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 27 Jun 2013 23:53:42 +0000 (09:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:50 +0000 (16:38 +1000)
Use module_platform_driver() to register the platform driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-twl.c

index 8a04044a9c1cfd950fe791edce538943ff2a39b0..02faf3c4e0d51d13cd6fd7c55b2de4f09776f08f 100644 (file)
@@ -626,17 +626,7 @@ static struct platform_driver twl4030rtc_driver = {
        },
 };
 
-static int __init twl_rtc_init(void)
-{
-       return platform_driver_register(&twl4030rtc_driver);
-}
-module_init(twl_rtc_init);
-
-static void __exit twl_rtc_exit(void)
-{
-       platform_driver_unregister(&twl4030rtc_driver);
-}
-module_exit(twl_rtc_exit);
+module_platform_driver(twl4030rtc_driver);
 
 MODULE_AUTHOR("Texas Instruments, MontaVista Software");
 MODULE_LICENSE("GPL");