提交 96acb25c 编写于 作者: B Benoît Thébaudeau 提交者: Alexandre Belloni

rtc: rv8803: Remove the check for valid time

The RTC core always calls rtc_valid_tm() after ->read_time() in case of
success (in __rtc_read_time()), so do not call it twice.
Signed-off-by: NBenoît Thébaudeau <benoit@wsystem.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 34166a00
...@@ -150,7 +150,7 @@ static int rv8803_get_time(struct device *dev, struct rtc_time *tm) ...@@ -150,7 +150,7 @@ static int rv8803_get_time(struct device *dev, struct rtc_time *tm)
tm->tm_mon = bcd2bin(date[RV8803_MONTH] & 0x1f) - 1; tm->tm_mon = bcd2bin(date[RV8803_MONTH] & 0x1f) - 1;
tm->tm_year = bcd2bin(date[RV8803_YEAR]) + 100; tm->tm_year = bcd2bin(date[RV8803_YEAR]) + 100;
return rtc_valid_tm(tm); return 0;
} }
static int rv8803_set_time(struct device *dev, struct rtc_time *tm) static int rv8803_set_time(struct device *dev, struct rtc_time *tm)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册