]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc: rtc-at91rm9200: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Wed, 20 Mar 2013 04:07:55 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Mar 2013 05:34:09 +0000 (16:34 +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-at91rm9200.c

index 434ebc3a99dc089d10a6d27e5be99faebb28aace..f63c8fee73eb3b0f918a346a22b066e653a1d5b5 100644 (file)
@@ -390,18 +390,7 @@ static struct platform_driver at91_rtc_driver = {
        },
 };
 
-static int __init at91_rtc_init(void)
-{
-       return platform_driver_probe(&at91_rtc_driver, at91_rtc_probe);
-}
-
-static void __exit at91_rtc_exit(void)
-{
-       platform_driver_unregister(&at91_rtc_driver);
-}
-
-module_init(at91_rtc_init);
-module_exit(at91_rtc_exit);
+module_platform_driver_probe(at91_rtc_driver, at91_rtc_probe);
 
 MODULE_AUTHOR("Rick Bronson");
 MODULE_DESCRIPTION("RTC driver for Atmel AT91RM9200");