diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-29 19:18:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 21:28:23 -0400 |
commit | 625f5225bd87e5badd9d4c1f9f0be4a55f2630d7 (patch) | |
tree | a0559500a785bcd2df1061ce5e19c8212aa25c1f /drivers/rtc/rtc-ds1302.c | |
parent | ce14a0261802e2758439c30dadac78f764c1fe16 (diff) |
rtc: rtc-ds1302: 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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-ds1302.c')
-rw-r--r-- | drivers/rtc/rtc-ds1302.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-ds1302.c b/drivers/rtc/rtc-ds1302.c index d20b5f11c3f0..7d4c2b44d603 100644 --- a/drivers/rtc/rtc-ds1302.c +++ b/drivers/rtc/rtc-ds1302.c | |||
@@ -252,18 +252,7 @@ static struct platform_driver ds1302_platform_driver = { | |||
252 | .remove = __exit_p(ds1302_rtc_remove), | 252 | .remove = __exit_p(ds1302_rtc_remove), |
253 | }; | 253 | }; |
254 | 254 | ||
255 | static int __init ds1302_rtc_init(void) | 255 | module_platform_driver_probe(ds1302_platform_driver, ds1302_rtc_probe); |
256 | { | ||
257 | return platform_driver_probe(&ds1302_platform_driver, ds1302_rtc_probe); | ||
258 | } | ||
259 | |||
260 | static void __exit ds1302_rtc_exit(void) | ||
261 | { | ||
262 | platform_driver_unregister(&ds1302_platform_driver); | ||
263 | } | ||
264 | |||
265 | module_init(ds1302_rtc_init); | ||
266 | module_exit(ds1302_rtc_exit); | ||
267 | 256 | ||
268 | MODULE_DESCRIPTION("Dallas DS1302 RTC driver"); | 257 | MODULE_DESCRIPTION("Dallas DS1302 RTC driver"); |
269 | MODULE_VERSION(DRV_VERSION); | 258 | MODULE_VERSION(DRV_VERSION); |