diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-29 16:18:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 18:28:23 -0700 |
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 = { .remove = __exit_p(ds1302_rtc_remove), }; -static int __init ds1302_rtc_init(void) -{ - return platform_driver_probe(&ds1302_platform_driver, ds1302_rtc_probe); -} - -static void __exit ds1302_rtc_exit(void) -{ - platform_driver_unregister(&ds1302_platform_driver); -} - -module_init(ds1302_rtc_init); -module_exit(ds1302_rtc_exit); +module_platform_driver_probe(ds1302_platform_driver, ds1302_rtc_probe); MODULE_DESCRIPTION("Dallas DS1302 RTC driver"); MODULE_VERSION(DRV_VERSION); |