aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds1302.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-04-29 19:18:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 21:28:23 -0400
commit625f5225bd87e5badd9d4c1f9f0be4a55f2630d7 (patch)
treea0559500a785bcd2df1061ce5e19c8212aa25c1f /drivers/rtc/rtc-ds1302.c
parentce14a0261802e2758439c30dadac78f764c1fe16 (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.c13
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
255static int __init ds1302_rtc_init(void) 255module_platform_driver_probe(ds1302_platform_driver, ds1302_rtc_probe);
256{
257 return platform_driver_probe(&ds1302_platform_driver, ds1302_rtc_probe);
258}
259
260static void __exit ds1302_rtc_exit(void)
261{
262 platform_driver_unregister(&ds1302_platform_driver);
263}
264
265module_init(ds1302_rtc_init);
266module_exit(ds1302_rtc_exit);
267 256
268MODULE_DESCRIPTION("Dallas DS1302 RTC driver"); 257MODULE_DESCRIPTION("Dallas DS1302 RTC driver");
269MODULE_VERSION(DRV_VERSION); 258MODULE_VERSION(DRV_VERSION);