From: Jingoo Han Date: Wed, 20 Mar 2013 04:07:54 +0000 (+1100) Subject: rtc: rtc-ab3100: use module_platform_driver_probe() X-Git-Tag: next-20130320~2^2~246 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c6dd5b0ac75a60adf4fbbb5245975a5a49ac7003;p=karo-tx-linux.git rtc: rtc-ab3100: use module_platform_driver_probe() Use module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han Acked-by: Linus Walleij Signed-off-by: Andrew Morton --- diff --git a/drivers/rtc/rtc-ab3100.c b/drivers/rtc/rtc-ab3100.c index 261a07e0fb24..c2f12d370009 100644 --- a/drivers/rtc/rtc-ab3100.c +++ b/drivers/rtc/rtc-ab3100.c @@ -257,19 +257,7 @@ static struct platform_driver ab3100_rtc_driver = { .remove = __exit_p(ab3100_rtc_remove), }; -static int __init ab3100_rtc_init(void) -{ - return platform_driver_probe(&ab3100_rtc_driver, - ab3100_rtc_probe); -} - -static void __exit ab3100_rtc_exit(void) -{ - platform_driver_unregister(&ab3100_rtc_driver); -} - -module_init(ab3100_rtc_init); -module_exit(ab3100_rtc_exit); +module_platform_driver_probe(ab3100_rtc_driver, ab3100_rtc_probe); MODULE_AUTHOR("Linus Walleij "); MODULE_DESCRIPTION("AB3100 RTC Driver");