]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc: rtc-mc13xxx: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Tue, 26 Mar 2013 23:25:18 +0000 (10:25 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 06:12:36 +0000 (17:12 +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-mc13xxx.c

index 2643d8874925c6d10e82c4939724e1d94e63e0d9..5391b154b43cd4a72272c91bacfaa0b529e919ab 100644 (file)
@@ -420,17 +420,7 @@ static struct platform_driver mc13xxx_rtc_driver = {
        },
 };
 
-static int __init mc13xxx_rtc_init(void)
-{
-       return platform_driver_probe(&mc13xxx_rtc_driver, &mc13xxx_rtc_probe);
-}
-module_init(mc13xxx_rtc_init);
-
-static void __exit mc13xxx_rtc_exit(void)
-{
-       platform_driver_unregister(&mc13xxx_rtc_driver);
-}
-module_exit(mc13xxx_rtc_exit);
+module_platform_driver_probe(mc13xxx_rtc_driver, &mc13xxx_rtc_probe);
 
 MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
 MODULE_DESCRIPTION("RTC driver for Freescale MC13XXX PMIC");