]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc: rtc-at32ap700x: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Tue, 26 Mar 2013 23:25:15 +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-at32ap700x.c

index 8dd08305aae13148239dfb5c6f27823ac51edad3..619c8877f2f1a7f7d0ddaf68f6901e84227c173c 100644 (file)
@@ -302,17 +302,7 @@ static struct platform_driver at32_rtc_driver = {
        },
 };
 
-static int __init at32_rtc_init(void)
-{
-       return platform_driver_probe(&at32_rtc_driver, at32_rtc_probe);
-}
-module_init(at32_rtc_init);
-
-static void __exit at32_rtc_exit(void)
-{
-       platform_driver_unregister(&at32_rtc_driver);
-}
-module_exit(at32_rtc_exit);
+module_platform_driver_probe(at32_rtc_driver, at32_rtc_probe);
 
 MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>");
 MODULE_DESCRIPTION("Real time clock for AVR32 AT32AP700x");