summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-at91rm9200.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-11-10 11:59:30 +0300
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-11-10 18:24:27 +0300
commit275ebe2b8fcab4ba4a774e6ee1e3e28d495cff3e (patch)
treeb5dc25bd43390fd1319e166d063cedca12f39b9d /drivers/rtc/rtc-at91rm9200.c
parent9a06da2ecc92a81e969bd8c3768f63b63cb02e80 (diff)
downloadlinux-275ebe2b8fcab4ba4a774e6ee1e3e28d495cff3e.tar.xz
rtc: at91rm9200: stop calculating yday in at91_rtc_readalarm
Calculating yday in the read_alarm callback is useless as this value is never used later. Also, it was buggy anyway because at the time this is done, tm_year is always 0 as the alarm register doesn't hold the year. Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-at91rm9200.c')
-rw-r--r--drivers/rtc/rtc-at91rm9200.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index e221b78b6f10..e84f5ec4faf6 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -208,7 +208,6 @@ static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
struct rtc_time *tm = &alrm->time;
at91_rtc_decodetime(AT91_RTC_TIMALR, AT91_RTC_CALALR, tm);
- tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year);
tm->tm_year = at91_alarm_year - 1900;
alrm->enabled = (at91_rtc_read_imr() & AT91_RTC_ALARM)