]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rtc: stop validating rtc_time after rtc_time64_to_tm
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 19 Feb 2018 15:23:55 +0000 (16:23 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 1 Mar 2018 09:49:41 +0000 (10:49 +0100)
rtc_time64_to_tm never generates an invalid tm. It is not necessary to
validate it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-ab3100.c
drivers/rtc/rtc-mc13xxx.c
drivers/rtc/rtc-zynqmp.c

index 9b725c55305859b48f5e6f2ffe45088d4b6f0659..821ff52a2222e03f02c7ecc34e8d1bc6de5d18b0 100644 (file)
@@ -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)
index 30b8ef6a3676b73973a3fcbe427f1e752f29124c..1f892b238ddbc05094c1ec8da784e22a37a1d4fa 100644 (file)
@@ -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)
index da18a8ae3c1ddbb6f56925005019a2bd9a0d75ea..fba994dc31eb406f00c25fc60ee47b1463cf1a5d 100644 (file)
@@ -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)