diff options
author | Fabio Porcedda <fabio.porcedda@gmail.com> | 2013-07-03 18:08:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:08:00 -0400 |
commit | 061d2a3e39c4686039519509d69cd31c7841f666 (patch) | |
tree | 4f2d493e54e739c26096e975d1e4b2bf201d591b | |
parent | 1d2e2b65d098c0a321e16b0997eb760439d99500 (diff) |
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 <fabio.porcedda@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/rtc/rtc-ds1216.c | 13 |
1 files changed, 1 insertions, 12 deletions
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 = { | |||
174 | }, | 174 | }, |
175 | }; | 175 | }; |
176 | 176 | ||
177 | static int __init ds1216_rtc_init(void) | 177 | module_platform_driver_probe(ds1216_rtc_platform_driver, ds1216_rtc_probe); |
178 | { | ||
179 | return platform_driver_probe(&ds1216_rtc_platform_driver, ds1216_rtc_probe); | ||
180 | } | ||
181 | |||
182 | static void __exit ds1216_rtc_exit(void) | ||
183 | { | ||
184 | platform_driver_unregister(&ds1216_rtc_platform_driver); | ||
185 | } | ||
186 | 178 | ||
187 | MODULE_AUTHOR("Thomas Bogendoerfer <tsbogend@alpha.franken.de>"); | 179 | MODULE_AUTHOR("Thomas Bogendoerfer <tsbogend@alpha.franken.de>"); |
188 | MODULE_DESCRIPTION("DS1216 RTC driver"); | 180 | MODULE_DESCRIPTION("DS1216 RTC driver"); |
189 | MODULE_LICENSE("GPL"); | 181 | MODULE_LICENSE("GPL"); |
190 | MODULE_VERSION(DRV_VERSION); | 182 | MODULE_VERSION(DRV_VERSION); |
191 | MODULE_ALIAS("platform:rtc-ds1216"); | 183 | MODULE_ALIAS("platform:rtc-ds1216"); |
192 | |||
193 | module_init(ds1216_rtc_init); | ||
194 | module_exit(ds1216_rtc_exit); | ||