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

index 0a9f27e094ea9ea122ec0658c673a3249eb6e04e..6143021dc2dab40eb0a24430bc1a03fb07352381 100644 (file)
@@ -402,18 +402,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");