提交 146d21bd 编写于 作者: A Alexandre Belloni

rtc: stop validating rtc_time after rtc_time64_to_tm

rtc_time64_to_tm never generates an invalid tm. It is not necessary to
validate it.
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
上级 bd7f4e75
...@@ -106,7 +106,7 @@ static int ab3100_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -106,7 +106,7 @@ static int ab3100_rtc_read_time(struct device *dev, struct rtc_time *tm)
rtc_time64_to_tm(time, tm); rtc_time64_to_tm(time, tm);
return rtc_valid_tm(tm); return 0;
} }
static int ab3100_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) static int ab3100_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
......
...@@ -85,7 +85,7 @@ static int mc13xxx_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -85,7 +85,7 @@ static int mc13xxx_rtc_read_time(struct device *dev, struct rtc_time *tm)
rtc_time64_to_tm((time64_t)days1 * SEC_PER_DAY + seconds, tm); rtc_time64_to_tm((time64_t)days1 * SEC_PER_DAY + seconds, tm);
return rtc_valid_tm(tm); return 0;
} }
static int mc13xxx_rtc_set_mmss(struct device *dev, time64_t secs) static int mc13xxx_rtc_set_mmss(struct device *dev, time64_t secs)
......
...@@ -122,7 +122,7 @@ static int xlnx_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -122,7 +122,7 @@ static int xlnx_rtc_read_time(struct device *dev, struct rtc_time *tm)
rtc_time64_to_tm(read_time, tm); rtc_time64_to_tm(read_time, tm);
} }
return rtc_valid_tm(tm); return 0;
} }
static int xlnx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) static int xlnx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册