提交 726a54cd 编写于 作者: U Uwe Kleine-König 提交者: Alexandre Belloni

rtc: sh: drop bogus assignment of tm_year in .read_alarm

This rtc doesn't support triggering on years, so don't assign tm_year
instead of claiming the alarm is to trigger in year 67435.
Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 bea9db3d
......@@ -481,7 +481,6 @@ static int sh_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
tm->tm_mon = sh_rtc_read_alarm_value(rtc, RMONAR);
if (tm->tm_mon > 0)
tm->tm_mon -= 1; /* RTC is 1-12, tm_mon is 0-11 */
tm->tm_year = 0xffff;
wkalrm->enabled = (readb(rtc->regbase + RCR1) & RCR1_AIE) ? 1 : 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册