diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-04-19 12:17:34 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-19 12:17:34 -0400 |
commit | cf816ecb533ab96b883dfdc0db174598b5b5c4d2 (patch) | |
tree | 1b7705db288ae2917105e624b01fdf81e0882bf1 /drivers/rtc | |
parent | adf6d34e460387ee3e8f1e1875d52bff51212c7d (diff) | |
parent | 15f7d677ccff6f0f5de8a1ee43a792567e9f9de9 (diff) |
Merge branch 'merge-fixes' into devel
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-cmos.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index b48517021ee6..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; |