X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Frtc%2Frtc-cmos.c;h=d060a06ce05b67c7351a73e3a76bbd34444eb54c;hb=7798ed0f57b4d137e660fbf5be1e1528e40f89ac;hp=e059f94c79eb2663632feff0e7a990d7aaa0a42c;hpb=8755e568250ecd3149ecd3495d8070f3a5384f73;p=linux-2.6-omap-h63xx.git diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index e059f94c79e..d060a06ce05 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -198,9 +198,8 @@ static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t) /* Writing 0xff means "don't care" or "match all". */ - mon = t->time.tm_mon; - mon = (mon < 12) ? BIN2BCD(mon) : 0xff; - mon++; + mon = t->time.tm_mon + 1; + mon = (mon <= 12) ? BIN2BCD(mon) : 0xff; mday = t->time.tm_mday; mday = (mday >= 1 && mday <= 31) ? BIN2BCD(mday) : 0xff; @@ -388,6 +387,7 @@ static int cmos_procfs(struct device *dev, struct seq_file *seq) return seq_printf(seq, "periodic_IRQ\t: %s\n" "update_IRQ\t: %s\n" + "HPET_emulated\t: %s\n" // "square_wave\t: %s\n" // "BCD\t\t: %s\n" "DST_enable\t: %s\n" @@ -395,6 +395,7 @@ static int cmos_procfs(struct device *dev, struct seq_file *seq) "batt_status\t: %s\n", (rtc_control & RTC_PIE) ? "yes" : "no", (rtc_control & RTC_UIE) ? "yes" : "no", + is_hpet_enabled() ? "yes" : "no", // (rtc_control & RTC_SQWE) ? "yes" : "no", // (rtc_control & RTC_DM_BINARY) ? "no" : "yes", (rtc_control & RTC_DST_EN) ? "yes" : "no", @@ -853,11 +854,12 @@ cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) * don't define the IRQ. It should always be safe to * hardcode it in these cases */ - return cmos_do_probe(&pnp->dev, &pnp->res.port_resource[0], 8); + return cmos_do_probe(&pnp->dev, + pnp_get_resource(pnp, IORESOURCE_IO, 0), 8); else return cmos_do_probe(&pnp->dev, - &pnp->res.port_resource[0], - pnp->res.irq_resource[0].start); + pnp_get_resource(pnp, IORESOURCE_IO, 0), + pnp_irq(pnp, 0)); } static void __exit cmos_pnp_remove(struct pnp_dev *pnp) @@ -941,6 +943,9 @@ static void cmos_platform_shutdown(struct platform_device *pdev) cmos_do_shutdown(); } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:rtc_cmos"); + static struct platform_driver cmos_platform_driver = { .remove = __exit_p(cmos_platform_remove), .shutdown = cmos_platform_shutdown,