From: Jingoo Han Date: Mon, 29 Apr 2013 23:18:51 +0000 (-0700) Subject: rtc: rtc-sh: use module_platform_driver_probe() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=deed5a9dc94cf375d4cdd4330b34fcdfc0e41a74;p=deliverable%2Flinux.git rtc: rtc-sh: 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: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index e55a7635ae5f..5f4708522f4d 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c @@ -820,18 +820,7 @@ static struct platform_driver sh_rtc_platform_driver = { .remove = __exit_p(sh_rtc_remove), }; -static int __init sh_rtc_init(void) -{ - return platform_driver_probe(&sh_rtc_platform_driver, sh_rtc_probe); -} - -static void __exit sh_rtc_exit(void) -{ - platform_driver_unregister(&sh_rtc_platform_driver); -} - -module_init(sh_rtc_init); -module_exit(sh_rtc_exit); +module_platform_driver_probe(sh_rtc_platform_driver, sh_rtc_probe); MODULE_DESCRIPTION("SuperH on-chip RTC driver"); MODULE_VERSION(DRV_VERSION);