drivers/rtc/rtc-at91rm9200.c: correct alarm over day/month wrap
authorLinus Pizunski <linus@narrativeteam.com>
Fri, 13 Dec 2013 01:12:23 +0000 (17:12 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 3 Jan 2014 04:33:31 +0000 (04:33 +0000)
commit eb3c227289840eed95ddfb0516046f08d8993940 upstream.

Update month and day of month to the alarm month/day instead of current
day/month when setting the RTC alarm mask.

Signed-off-by: Linus Pizunski <linus@narrativeteam.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/rtc/rtc-at91rm9200.c

index e39b77a..15406d5 100644 (file)
@@ -156,6 +156,8 @@ static int at91_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
 
        at91_alarm_year = tm.tm_year;
 
+       tm.tm_mon = alrm->time.tm_mon;
+       tm.tm_mday = alrm->time.tm_mday;
        tm.tm_hour = alrm->time.tm_hour;
        tm.tm_min = alrm->time.tm_min;
        tm.tm_sec = alrm->time.tm_sec;