diff options
Diffstat (limited to 'drivers/rtc/rtc-omap.c')
-rw-r--r-- | drivers/rtc/rtc-omap.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index 58f81c774943..8876605d4d4b 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | 23 | ||
24 | #include <asm/io.h> | 24 | #include <asm/io.h> |
25 | #include <asm/mach/time.h> | ||
26 | 25 | ||
27 | 26 | ||
28 | /* The OMAP1 RTC is a year/month/day/hours/minutes/seconds BCD clock | 27 | /* The OMAP1 RTC is a year/month/day/hours/minutes/seconds BCD clock |
@@ -93,18 +92,6 @@ | |||
93 | #define rtc_write(val, addr) omap_writeb(val, OMAP_RTC_BASE + (addr)) | 92 | #define rtc_write(val, addr) omap_writeb(val, OMAP_RTC_BASE + (addr)) |
94 | 93 | ||
95 | 94 | ||
96 | /* platform_bus isn't hotpluggable, so for static linkage it'd be safe | ||
97 | * to get rid of probe() and remove() code ... too bad the driver struct | ||
98 | * remembers probe(), that's about 25% of the runtime footprint!! | ||
99 | */ | ||
100 | #ifndef MODULE | ||
101 | #undef __devexit | ||
102 | #undef __devexit_p | ||
103 | #define __devexit __exit | ||
104 | #define __devexit_p __exit_p | ||
105 | #endif | ||
106 | |||
107 | |||
108 | /* we rely on the rtc framework to handle locking (rtc->ops_lock), | 95 | /* we rely on the rtc framework to handle locking (rtc->ops_lock), |
109 | * so the only other requirement is that register accesses which | 96 | * so the only other requirement is that register accesses which |
110 | * require BUSY to be clear are made with IRQs locally disabled | 97 | * require BUSY to be clear are made with IRQs locally disabled |
@@ -325,7 +312,7 @@ static struct rtc_class_ops omap_rtc_ops = { | |||
325 | static int omap_rtc_alarm; | 312 | static int omap_rtc_alarm; |
326 | static int omap_rtc_timer; | 313 | static int omap_rtc_timer; |
327 | 314 | ||
328 | static int __devinit omap_rtc_probe(struct platform_device *pdev) | 315 | static int __init omap_rtc_probe(struct platform_device *pdev) |
329 | { | 316 | { |
330 | struct resource *res, *mem; | 317 | struct resource *res, *mem; |
331 | struct rtc_device *rtc; | 318 | struct rtc_device *rtc; |
@@ -441,7 +428,7 @@ fail: | |||
441 | return -EIO; | 428 | return -EIO; |
442 | } | 429 | } |
443 | 430 | ||
444 | static int __devexit omap_rtc_remove(struct platform_device *pdev) | 431 | static int __exit omap_rtc_remove(struct platform_device *pdev) |
445 | { | 432 | { |
446 | struct rtc_device *rtc = platform_get_drvdata(pdev);; | 433 | struct rtc_device *rtc = platform_get_drvdata(pdev);; |
447 | 434 | ||
@@ -499,8 +486,7 @@ static void omap_rtc_shutdown(struct platform_device *pdev) | |||
499 | 486 | ||
500 | MODULE_ALIAS("platform:omap_rtc"); | 487 | MODULE_ALIAS("platform:omap_rtc"); |
501 | static struct platform_driver omap_rtc_driver = { | 488 | static struct platform_driver omap_rtc_driver = { |
502 | .probe = omap_rtc_probe, | 489 | .remove = __exit_p(omap_rtc_remove), |
503 | .remove = __devexit_p(omap_rtc_remove), | ||
504 | .suspend = omap_rtc_suspend, | 490 | .suspend = omap_rtc_suspend, |
505 | .resume = omap_rtc_resume, | 491 | .resume = omap_rtc_resume, |
506 | .shutdown = omap_rtc_shutdown, | 492 | .shutdown = omap_rtc_shutdown, |
@@ -512,7 +498,7 @@ static struct platform_driver omap_rtc_driver = { | |||
512 | 498 | ||
513 | static int __init rtc_init(void) | 499 | static int __init rtc_init(void) |
514 | { | 500 | { |
515 | return platform_driver_register(&omap_rtc_driver); | 501 | return platform_driver_probe(&omap_rtc_driver, omap_rtc_probe); |
516 | } | 502 | } |
517 | module_init(rtc_init); | 503 | module_init(rtc_init); |
518 | 504 | ||