rtc: rtc-pxa: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Mon, 29 Apr 2013 23:18:49 +0000 (16:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 01:28:24 +0000 (18:28 -0700)
Use module_platform_driver_probe() macro which makes the code smaller and
simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-pxa.c

index 03c85ee719a7f46e95b45c0e08d375697c5f396e..22950bf6a6528ea8c9265b1832fab8a68da893de 100644 (file)
@@ -452,18 +452,7 @@ static struct platform_driver pxa_rtc_driver = {
        },
 };
 
-static int __init pxa_rtc_init(void)
-{
-       return platform_driver_probe(&pxa_rtc_driver, pxa_rtc_probe);
-}
-
-static void __exit pxa_rtc_exit(void)
-{
-       platform_driver_unregister(&pxa_rtc_driver);
-}
-
-module_init(pxa_rtc_init);
-module_exit(pxa_rtc_exit);
+module_platform_driver_probe(pxa_rtc_driver, pxa_rtc_probe);
 
 MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>");
 MODULE_DESCRIPTION("PXA27x/PXA3xx Realtime Clock Driver (RTC)");