From 146d21bd9dc167d75bed4c0fdfe790db7565e99b Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Mon, 19 Feb 2018 16:23:55 +0100 Subject: [PATCH] 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: Alexandre Belloni --- drivers/rtc/rtc-ab3100.c | 2 +- drivers/rtc/rtc-mc13xxx.c | 2 +- drivers/rtc/rtc-zynqmp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-ab3100.c b/drivers/rtc/rtc-ab3100.c index 9b725c5..821ff52 100644 --- a/drivers/rtc/rtc-ab3100.c +++ b/drivers/rtc/rtc-ab3100.c @@ -106,7 +106,7 @@ static int ab3100_rtc_read_time(struct device *dev, struct rtc_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) diff --git a/drivers/rtc/rtc-mc13xxx.c b/drivers/rtc/rtc-mc13xxx.c index 30b8ef6..1f892b2 100644 --- a/drivers/rtc/rtc-mc13xxx.c +++ b/drivers/rtc/rtc-mc13xxx.c @@ -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); - return rtc_valid_tm(tm); + return 0; } static int mc13xxx_rtc_set_mmss(struct device *dev, time64_t secs) diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c index da18a8a..fba994d 100644 --- a/drivers/rtc/rtc-zynqmp.c +++ b/drivers/rtc/rtc-zynqmp.c @@ -122,7 +122,7 @@ static int xlnx_rtc_read_time(struct device *dev, struct rtc_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) -- 2.7.4