Commit deed5a9dc94cf375d4cdd4330b34fcdfc0e41a74

Authored by Jingoo Han
Committed by Linus Torvalds
1 parent 9842eaff05

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 <jg1.han@samsung.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 12 deletions Side-by-side Diff

drivers/rtc/rtc-sh.c
... ... @@ -820,18 +820,7 @@
820 820 .remove = __exit_p(sh_rtc_remove),
821 821 };
822 822  
823   -static int __init sh_rtc_init(void)
824   -{
825   - return platform_driver_probe(&sh_rtc_platform_driver, sh_rtc_probe);
826   -}
827   -
828   -static void __exit sh_rtc_exit(void)
829   -{
830   - platform_driver_unregister(&sh_rtc_platform_driver);
831   -}
832   -
833   -module_init(sh_rtc_init);
834   -module_exit(sh_rtc_exit);
  823 +module_platform_driver_probe(sh_rtc_platform_driver, sh_rtc_probe);
835 824  
836 825 MODULE_DESCRIPTION("SuperH on-chip RTC driver");
837 826 MODULE_VERSION(DRV_VERSION);