diff options
Diffstat (limited to 'drivers/rtc/rtc-cmos.c')
| -rw-r--r-- | drivers/rtc/rtc-cmos.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index f3ee2ad566b4..dcdc142a3441 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) | |||
| 198 | 198 | ||
| 199 | /* Writing 0xff means "don't care" or "match all". */ | 199 | /* Writing 0xff means "don't care" or "match all". */ |
| 200 | 200 | ||
| 201 | mon = t->time.tm_mon; | 201 | mon = t->time.tm_mon + 1; |
| 202 | mon = (mon < 12) ? BIN2BCD(mon) : 0xff; | 202 | mon = (mon <= 12) ? BIN2BCD(mon) : 0xff; |
| 203 | mon++; | ||
| 204 | 203 | ||
| 205 | mday = t->time.tm_mday; | 204 | mday = t->time.tm_mday; |
| 206 | mday = (mday >= 1 && mday <= 31) ? BIN2BCD(mday) : 0xff; | 205 | mday = (mday >= 1 && mday <= 31) ? BIN2BCD(mday) : 0xff; |
| @@ -943,6 +942,9 @@ static void cmos_platform_shutdown(struct platform_device *pdev) | |||
| 943 | cmos_do_shutdown(); | 942 | cmos_do_shutdown(); |
| 944 | } | 943 | } |
| 945 | 944 | ||
| 945 | /* work with hotplug and coldplug */ | ||
| 946 | MODULE_ALIAS("platform:rtc_cmos"); | ||
| 947 | |||
| 946 | static struct platform_driver cmos_platform_driver = { | 948 | static struct platform_driver cmos_platform_driver = { |
| 947 | .remove = __exit_p(cmos_platform_remove), | 949 | .remove = __exit_p(cmos_platform_remove), |
| 948 | .shutdown = cmos_platform_shutdown, | 950 | .shutdown = cmos_platform_shutdown, |
