summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Pizunski <linus@narrativeteam.com>2013-12-12 17:12:23 -0800
committerBen Hutchings <ben@decadent.org.uk>2014-01-03 04:33:31 +0000
commitdae9d455d193fd2bc03fca65d255053f4debf8aa (patch)
tree1ae75807b7065feae76fe18e2023a7aeba51f9af
parent117bd60788c1cfd2281a62cbc0d32798725cfd23 (diff)
drivers/rtc/rtc-at91rm9200.c: correct alarm over day/month wrap
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>
-rw-r--r--drivers/rtc/rtc-at91rm9200.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index e39b77a4609a..15406d5e593e 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -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;