]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc: rtc-pxa: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Wed, 20 Mar 2013 04:07:59 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Mar 2013 04:23:09 +0000 (15:23 +1100)
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>
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)");