From: Fabio Porcedda Date: Wed, 3 Jul 2013 22:08:03 +0000 (-0700) Subject: drivers/rtc/rtc-ds1216.c: use module_platform_driver_probe() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=061d2a3e39c4686039519509d69cd31c7841f666;p=openwrt%2Fstaging%2Fblogic.git drivers/rtc/rtc-ds1216.c: use module_platform_driver_probe() Use module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Fabio Porcedda Cc: Alessandro Zummo Cc: Jingoo Han Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-ds1216.c b/drivers/rtc/rtc-ds1216.c index 1831c8461b90..9c04fd2bc209 100644 --- a/drivers/rtc/rtc-ds1216.c +++ b/drivers/rtc/rtc-ds1216.c @@ -174,21 +174,10 @@ static struct platform_driver ds1216_rtc_platform_driver = { }, }; -static int __init ds1216_rtc_init(void) -{ - return platform_driver_probe(&ds1216_rtc_platform_driver, ds1216_rtc_probe); -} - -static void __exit ds1216_rtc_exit(void) -{ - platform_driver_unregister(&ds1216_rtc_platform_driver); -} +module_platform_driver_probe(ds1216_rtc_platform_driver, ds1216_rtc_probe); MODULE_AUTHOR("Thomas Bogendoerfer "); MODULE_DESCRIPTION("DS1216 RTC driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_VERSION); MODULE_ALIAS("platform:rtc-ds1216"); - -module_init(ds1216_rtc_init); -module_exit(ds1216_rtc_exit);