diff options
| -rw-r--r-- | drivers/rtc/rtc-cmos.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index e3fe83a23cf7..29cf1457ca10 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
| @@ -120,7 +120,8 @@ static int cmos_read_alarm(struct device *dev, struct rtc_wkalrm *t) | |||
| 120 | t->time.tm_hour = CMOS_READ(RTC_HOURS_ALARM); | 120 | t->time.tm_hour = CMOS_READ(RTC_HOURS_ALARM); |
| 121 | 121 | ||
| 122 | if (cmos->day_alrm) { | 122 | if (cmos->day_alrm) { |
| 123 | t->time.tm_mday = CMOS_READ(cmos->day_alrm); | 123 | /* ignore upper bits on readback per ACPI spec */ |
| 124 | t->time.tm_mday = CMOS_READ(cmos->day_alrm) & 0x3f; | ||
| 124 | if (!t->time.tm_mday) | 125 | if (!t->time.tm_mday) |
| 125 | t->time.tm_mday = -1; | 126 | t->time.tm_mday = -1; |
| 126 | 127 | ||
