X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Frtc%2Frtc-omap.c;h=58f81c7749435b307afea30f498959da5abcbe1c;hb=73422392734bb68c8ff8bc74ce1bbdc32f1b639a;hp=e6c7b0149f27983a96e8bc29b6752ae8fa119c98;hpb=7ca1d488ffe4817adaba61cc05b972782f7d3f91;p=linux-2.6-omap-h63xx.git diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index e6c7b0149f2..58f81c77494 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -289,34 +289,6 @@ static int omap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) { u8 reg; - /* Much userspace code uses RTC_ALM_SET, thus "don't care" for - * day/month/year specifies alarms up to 24 hours in the future. - * So we need to handle that ... but let's ignore the "don't care" - * values for hours/minutes/seconds. - */ - if (alm->time.tm_mday <= 0 - && alm->time.tm_mon < 0 - && alm->time.tm_year < 0) { - struct rtc_time tm; - unsigned long now, then; - - omap_rtc_read_time(dev, &tm); - rtc_tm_to_time(&tm, &now); - - alm->time.tm_mday = tm.tm_mday; - alm->time.tm_mon = tm.tm_mon; - alm->time.tm_year = tm.tm_year; - rtc_tm_to_time(&alm->time, &then); - - /* sometimes the alarm wraps into tomorrow */ - if (then < now) { - rtc_time_to_tm(now + 24 * 60 * 60, &tm); - alm->time.tm_mday = tm.tm_mday; - alm->time.tm_mon = tm.tm_mon; - alm->time.tm_year = tm.tm_year; - } - } - if (tm2bcd(&alm->time) < 0) return -EINVAL; @@ -399,7 +371,7 @@ static int __devinit omap_rtc_probe(struct platform_device *pdev) goto fail; } platform_set_drvdata(pdev, rtc); - dev_set_devdata(&rtc->dev, mem); + dev_set_drvdata(&rtc->dev, mem); /* clear pending irqs, and set 1/second periodic, * which we'll use instead of update irqs @@ -481,7 +453,7 @@ static int __devexit omap_rtc_remove(struct platform_device *pdev) free_irq(omap_rtc_timer, rtc); free_irq(omap_rtc_alarm, rtc); - release_resource(dev_get_devdata(&rtc->dev)); + release_resource(dev_get_drvdata(&rtc->dev)); rtc_device_unregister(rtc); return 0; } @@ -525,7 +497,7 @@ static void omap_rtc_shutdown(struct platform_device *pdev) rtc_write(0, OMAP_RTC_INTERRUPTS_REG); } -MODULE_ALIAS("omap_rtc"); +MODULE_ALIAS("platform:omap_rtc"); static struct platform_driver omap_rtc_driver = { .probe = omap_rtc_probe, .remove = __devexit_p(omap_rtc_remove),