diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-02-19 16:23:56 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-03-02 10:09:58 +0100 |
commit | 22652ba72453d35c8a637d5c0f06b3dc29ff9eb0 (patch) | |
tree | 96852aa824fa865e61b8c509e3355d0b81fbe7d3 /drivers/rtc | |
parent | ab62670e57174c547abbecacf6df78d3dcf03f26 (diff) | |
download | linux-22652ba72453d35c8a637d5c0f06b3dc29ff9eb0.tar.bz2 |
rtc: stop validating rtc_time in .read_time
The RTC core is always calling rtc_valid_tm after the read_time callback.
It is not necessary to call it just before returning from the callback.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
48 files changed, 48 insertions, 53 deletions
diff --git a/drivers/rtc/rtc-ac100.c b/drivers/rtc/rtc-ac100.c index 8ff9dc3fe5bf..080e3c04be43 100644 --- a/drivers/rtc/rtc-ac100.c +++ b/drivers/rtc/rtc-ac100.c @@ -387,7 +387,7 @@ static int ac100_rtc_get_time(struct device *dev, struct rtc_time *rtc_tm) rtc_tm->tm_year = bcd2bin(reg[6] & AC100_RTC_YEA_MASK) + AC100_YEAR_OFF; - return rtc_valid_tm(rtc_tm); + return 0; } static int ac100_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm) diff --git a/drivers/rtc/rtc-au1xxx.c b/drivers/rtc/rtc-au1xxx.c index 2ba44ccb9c3a..7c5530c71285 100644 --- a/drivers/rtc/rtc-au1xxx.c +++ b/drivers/rtc/rtc-au1xxx.c @@ -36,7 +36,7 @@ static int au1xtoy_rtc_read_time(struct device *dev, struct rtc_time *tm) rtc_time_to_tm(t, tm); - return rtc_valid_tm(tm); + return 0; } static int au1xtoy_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c index 98ac8d5c7901..e8698e9870fe 100644 --- a/drivers/rtc/rtc-bq32k.c +++ b/drivers/rtc/rtc-bq32k.c @@ -110,7 +110,7 @@ static int bq32k_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_year = bcd2bin(regs.years) + ((regs.cent_hours & BQ32K_CENT) ? 100 : 0); - return rtc_valid_tm(tm); + return 0; } static int bq32k_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-ds1216.c b/drivers/rtc/rtc-ds1216.c index 9c82b1da2d45..5f158715fb4c 100644 --- a/drivers/rtc/rtc-ds1216.c +++ b/drivers/rtc/rtc-ds1216.c @@ -99,7 +99,7 @@ static int ds1216_rtc_read_time(struct device *dev, struct rtc_time *tm) if (tm->tm_year < 70) tm->tm_year += 100; - return rtc_valid_tm(tm); + return 0; } static int ds1216_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-ds1286.c b/drivers/rtc/rtc-ds1286.c index ef75c349dff9..0744916b79c5 100644 --- a/drivers/rtc/rtc-ds1286.c +++ b/drivers/rtc/rtc-ds1286.c @@ -211,7 +211,7 @@ static int ds1286_read_time(struct device *dev, struct rtc_time *tm) tm->tm_mon--; - return rtc_valid_tm(tm); + return 0; } static int ds1286_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-ds1302.c b/drivers/rtc/rtc-ds1302.c index 43bcb17c922e..2a881150d51c 100644 --- a/drivers/rtc/rtc-ds1302.c +++ b/drivers/rtc/rtc-ds1302.c @@ -98,8 +98,7 @@ static int ds1302_rtc_get_time(struct device *dev, struct rtc_time *time) time->tm_mon = bcd2bin(buf[RTC_ADDR_MON]) - 1; time->tm_year = bcd2bin(buf[RTC_ADDR_YEAR]) + 100; - /* Time may not be set */ - return rtc_valid_tm(time); + return 0; } static const struct rtc_class_ops ds1302_rtc_ops = { diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c index 3d2400a39da9..2d502fc85698 100644 --- a/drivers/rtc/rtc-ds1305.c +++ b/drivers/rtc/rtc-ds1305.c @@ -203,8 +203,7 @@ static int ds1305_get_time(struct device *dev, struct rtc_time *time) time->tm_hour, time->tm_mday, time->tm_mon, time->tm_year, time->tm_wday); - /* Time may not be set */ - return rtc_valid_tm(time); + return 0; } static int ds1305_set_time(struct device *dev, struct rtc_time *time) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 4021d478b9f3..a13e59edff53 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -437,8 +437,7 @@ static int ds1307_get_time(struct device *dev, struct rtc_time *t) t->tm_hour, t->tm_mday, t->tm_mon, t->tm_year, t->tm_wday); - /* initial clock setting can be undefined */ - return rtc_valid_tm(t); + return 0; } static int ds1307_set_time(struct device *dev, struct rtc_time *t) diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c index 59d27db2fd37..5208da4cf94a 100644 --- a/drivers/rtc/rtc-ds1343.c +++ b/drivers/rtc/rtc-ds1343.c @@ -254,7 +254,7 @@ static int ds1343_read_time(struct device *dev, struct rtc_time *dt) dt->tm_mon = bcd2bin(buf[5] & 0x1F) - 1; dt->tm_year = bcd2bin(buf[6]) + 100; /* year offset from 1900 */ - return rtc_valid_tm(dt); + return 0; } static int ds1343_set_time(struct device *dev, struct rtc_time *dt) diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc-ds1347.c index ccfc9d43eb1e..938512c676ee 100644 --- a/drivers/rtc/rtc-ds1347.c +++ b/drivers/rtc/rtc-ds1347.c @@ -66,7 +66,7 @@ static int ds1347_read_time(struct device *dev, struct rtc_time *dt) dt->tm_wday = bcd2bin(buf[5]) - 1; dt->tm_year = bcd2bin(buf[6]) + 100; - return rtc_valid_tm(dt); + return 0; } static int ds1347_set_time(struct device *dev, struct rtc_time *dt) diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c index 4d5b007d7fc6..3b095401f848 100644 --- a/drivers/rtc/rtc-ds1390.c +++ b/drivers/rtc/rtc-ds1390.c @@ -153,7 +153,7 @@ static int ds1390_read_time(struct device *dev, struct rtc_time *dt) /* adjust for century bit */ dt->tm_year = bcd2bin(chip->txrx_buf[6]) + ((chip->txrx_buf[5] & 0x80) ? 100 : 0); - return rtc_valid_tm(dt); + return 0; } static int ds1390_set_time(struct device *dev, struct rtc_time *dt) diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c index ed43b4311660..1a39829d2b40 100644 --- a/drivers/rtc/rtc-ds1685.c +++ b/drivers/rtc/rtc-ds1685.c @@ -306,7 +306,7 @@ ds1685_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year); tm->tm_isdst = 0; /* RTC has hardcoded timezone, so don't use. */ - return rtc_valid_tm(tm); + return 0; } /** diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c index 52baf925a690..2d781180e968 100644 --- a/drivers/rtc/rtc-ds1742.c +++ b/drivers/rtc/rtc-ds1742.c @@ -112,7 +112,7 @@ static int ds1742_rtc_read_time(struct device *dev, struct rtc_time *tm) /* year is 1900 + tm->tm_year */ tm->tm_year = bcd2bin(year) + bcd2bin(century) * 100 - 1900; - return rtc_valid_tm(tm); + return 0; } static const struct rtc_class_ops ds1742_rtc_ops = { diff --git a/drivers/rtc/rtc-ds2404.c b/drivers/rtc/rtc-ds2404.c index 9a1582ed7070..b886b6a5c178 100644 --- a/drivers/rtc/rtc-ds2404.c +++ b/drivers/rtc/rtc-ds2404.c @@ -207,7 +207,7 @@ static int ds2404_read_time(struct device *dev, struct rtc_time *dt) time = le32_to_cpu(time); rtc_time_to_tm(time, dt); - return rtc_valid_tm(dt); + return 0; } static int ds2404_set_mmss(struct device *dev, unsigned long secs) diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index 0550f7ba464f..7184e5145f12 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -145,7 +145,7 @@ static int ds3232_read_time(struct device *dev, struct rtc_time *time) time->tm_year = bcd2bin(year) + add_century; - return rtc_valid_tm(time); + return 0; } static int ds3232_set_time(struct device *dev, struct rtc_time *time) diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c index 0130afd7fe88..3454e7814524 100644 --- a/drivers/rtc/rtc-efi.c +++ b/drivers/rtc/rtc-efi.c @@ -176,7 +176,7 @@ static int efi_read_time(struct device *dev, struct rtc_time *tm) if (!convert_from_efi_time(&eft, tm)) return -EIO; - return rtc_valid_tm(tm); + return 0; } static int efi_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c index 576eadbba296..e1137670d4d2 100644 --- a/drivers/rtc/rtc-fm3130.c +++ b/drivers/rtc/rtc-fm3130.c @@ -136,8 +136,7 @@ static int fm3130_get_time(struct device *dev, struct rtc_time *t) t->tm_hour, t->tm_mday, t->tm_mon, t->tm_year, t->tm_wday); - /* initial clock setting can be undefined */ - return rtc_valid_tm(t); + return 0; } diff --git a/drivers/rtc/rtc-isl12022.c b/drivers/rtc/rtc-isl12022.c index 38586a024ee8..46093cd13d5e 100644 --- a/drivers/rtc/rtc-isl12022.c +++ b/drivers/rtc/rtc-isl12022.c @@ -149,7 +149,7 @@ static int isl12022_get_datetime(struct i2c_client *client, struct rtc_time *tm) tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); - return rtc_valid_tm(tm); + return 0; } static int isl12022_set_datetime(struct i2c_client *client, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-lpc24xx.c b/drivers/rtc/rtc-lpc24xx.c index 59d99596fdeb..14dc7b04fae0 100644 --- a/drivers/rtc/rtc-lpc24xx.c +++ b/drivers/rtc/rtc-lpc24xx.c @@ -110,7 +110,7 @@ static int lpc24xx_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_year = CT1_YEAR(ct1); tm->tm_yday = CT2_DOY(ct2); - return rtc_valid_tm(tm); + return 0; } static int lpc24xx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c index c90fba3ed861..1103cdc33bfa 100644 --- a/drivers/rtc/rtc-m41t80.c +++ b/drivers/rtc/rtc-m41t80.c @@ -230,7 +230,7 @@ static int m41t80_get_datetime(struct i2c_client *client, /* assume 20YY not 19YY, and ignore the Century Bit */ tm->tm_year = bcd2bin(buf[M41T80_REG_YEAR]) + 100; - return rtc_valid_tm(tm); + return 0; } /* Sets the given date and time to the real time clock. */ diff --git a/drivers/rtc/rtc-m41t94.c b/drivers/rtc/rtc-m41t94.c index 1f0eb79e69f9..bab82b4be356 100644 --- a/drivers/rtc/rtc-m41t94.c +++ b/drivers/rtc/rtc-m41t94.c @@ -99,8 +99,7 @@ static int m41t94_read_time(struct device *dev, struct rtc_time *tm) tm->tm_hour, tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); - /* initial clock setting can be undefined */ - return rtc_valid_tm(tm); + return 0; } static const struct rtc_class_ops m41t94_rtc_ops = { diff --git a/drivers/rtc/rtc-m48t35.c b/drivers/rtc/rtc-m48t35.c index 810f4ea481e4..0cf6507de3c7 100644 --- a/drivers/rtc/rtc-m48t35.c +++ b/drivers/rtc/rtc-m48t35.c @@ -84,7 +84,7 @@ static int m48t35_read_time(struct device *dev, struct rtc_time *tm) tm->tm_year += 100; tm->tm_mon--; - return rtc_valid_tm(tm); + return 0; } static int m48t35_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c index d2ba7d76dbb9..216fac62c888 100644 --- a/drivers/rtc/rtc-m48t59.c +++ b/drivers/rtc/rtc-m48t59.c @@ -105,7 +105,7 @@ static int m48t59_rtc_read_time(struct device *dev, struct rtc_time *tm) dev_dbg(dev, "RTC read time %04d-%02d-%02d %02d/%02d/%02d\n", tm->tm_year + 1900, tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); - return rtc_valid_tm(tm); + return 0; } static int m48t59_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c index 8d17be1e6650..a9533535c3b7 100644 --- a/drivers/rtc/rtc-m48t86.c +++ b/drivers/rtc/rtc-m48t86.c @@ -100,7 +100,7 @@ static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm) if (m48t86_readb(dev, M48T86_HOUR) & 0x80) tm->tm_hour += 12; - return rtc_valid_tm(tm); + return 0; } static int m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c index 315d09e0f2c1..745827463367 100644 --- a/drivers/rtc/rtc-max6902.c +++ b/drivers/rtc/rtc-max6902.c @@ -85,7 +85,7 @@ static int max6902_read_time(struct device *dev, struct rtc_time *dt) dt->tm_year += century; dt->tm_year -= 1900; - return rtc_valid_tm(dt); + return 0; } static int max6902_set_time(struct device *dev, struct rtc_time *dt) diff --git a/drivers/rtc/rtc-max6916.c b/drivers/rtc/rtc-max6916.c index 623ab27b2757..7e908a490cf6 100644 --- a/drivers/rtc/rtc-max6916.c +++ b/drivers/rtc/rtc-max6916.c @@ -75,7 +75,7 @@ static int max6916_read_time(struct device *dev, struct rtc_time *dt) dt->tm_wday = bcd2bin(buf[5]) - 1; dt->tm_year = bcd2bin(buf[6]) + 100; - return rtc_valid_tm(dt); + return 0; } static int max6916_set_time(struct device *dev, struct rtc_time *dt) diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c index db984d4bf952..e8cee123e8aa 100644 --- a/drivers/rtc/rtc-max8997.c +++ b/drivers/rtc/rtc-max8997.c @@ -153,7 +153,7 @@ static int max8997_rtc_read_time(struct device *dev, struct rtc_time *tm) max8997_rtc_data_to_tm(data, tm, info->rtc_24hr_mode); - return rtc_valid_tm(tm); + return 0; } static int max8997_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-max8998.c b/drivers/rtc/rtc-max8998.c index 30804b00985e..d8c0f9b3f87d 100644 --- a/drivers/rtc/rtc-max8998.c +++ b/drivers/rtc/rtc-max8998.c @@ -120,7 +120,7 @@ static int max8998_rtc_read_time(struct device *dev, struct rtc_time *tm) max8998_data_to_tm(data, tm); - return rtc_valid_tm(tm); + return 0; } static int max8998_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c index 77f21331ae21..79e24eadbe99 100644 --- a/drivers/rtc/rtc-mcp795.c +++ b/drivers/rtc/rtc-mcp795.c @@ -262,7 +262,7 @@ static int mcp795_read_time(struct device *dev, struct rtc_time *tim) tim->tm_year + 1900, tim->tm_mon, tim->tm_mday, tim->tm_wday, tim->tm_hour, tim->tm_min, tim->tm_sec); - return rtc_valid_tm(tim); + return 0; } static int mcp795_set_alarm(struct device *dev, struct rtc_wkalrm *alm) diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c index 7334c44fa7c3..901a8d170f68 100644 --- a/drivers/rtc/rtc-mrst.c +++ b/drivers/rtc/rtc-mrst.c @@ -105,7 +105,7 @@ static int mrst_read_time(struct device *dev, struct rtc_time *time) /* Adjust for the 1972/1900 */ time->tm_year += 72; time->tm_mon--; - return rtc_valid_tm(time); + return 0; } static int mrst_set_time(struct device *dev, struct rtc_time *time) diff --git a/drivers/rtc/rtc-msm6242.c b/drivers/rtc/rtc-msm6242.c index c1c5c4e3b3b4..0c72a2e8ec67 100644 --- a/drivers/rtc/rtc-msm6242.c +++ b/drivers/rtc/rtc-msm6242.c @@ -155,7 +155,7 @@ static int msm6242_read_time(struct device *dev, struct rtc_time *tm) msm6242_unlock(priv); - return rtc_valid_tm(tm); + return 0; } static int msm6242_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-mt7622.c b/drivers/rtc/rtc-mt7622.c index d79b9ae4d237..da213278f343 100644 --- a/drivers/rtc/rtc-mt7622.c +++ b/drivers/rtc/rtc-mt7622.c @@ -232,7 +232,7 @@ static int mtk_rtc_gettime(struct device *dev, struct rtc_time *tm) mtk_rtc_get_alarm_or_time(hw, tm, MTK_TC); - return rtc_valid_tm(tm); + return 0; } static int mtk_rtc_settime(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c index 79bb28617d45..944c5c0fadd0 100644 --- a/drivers/rtc/rtc-mv.c +++ b/drivers/rtc/rtc-mv.c @@ -94,7 +94,7 @@ static int mv_rtc_read_time(struct device *dev, struct rtc_time *tm) /* hw counts from year 2000, but tm_year is relative to 1900 */ tm->tm_year = bcd2bin(year) + 100; - return rtc_valid_tm(tm); + return 0; } static int mv_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c index 8895f77726e8..e5222c5d8223 100644 --- a/drivers/rtc/rtc-pcf2123.c +++ b/drivers/rtc/rtc-pcf2123.c @@ -289,7 +289,7 @@ static int pcf2123_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); - return rtc_valid_tm(tm); + return 0; } static int pcf2123_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c index f33447c5db85..e83be1852c2f 100644 --- a/drivers/rtc/rtc-pcf2127.c +++ b/drivers/rtc/rtc-pcf2127.c @@ -111,7 +111,7 @@ static int pcf2127_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); - return rtc_valid_tm(tm); + return 0; } static int pcf2127_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-pcf50633.c b/drivers/rtc/rtc-pcf50633.c index 00c31c91b245..ef72b0c389d7 100644 --- a/drivers/rtc/rtc-pcf50633.c +++ b/drivers/rtc/rtc-pcf50633.c @@ -135,7 +135,7 @@ static int pcf50633_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec); - return rtc_valid_tm(tm); + return 0; } static int pcf50633_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-pcf8523.c b/drivers/rtc/rtc-pcf8523.c index c312af0db729..453615f8ac9a 100644 --- a/drivers/rtc/rtc-pcf8523.c +++ b/drivers/rtc/rtc-pcf8523.c @@ -192,7 +192,7 @@ static int pcf8523_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_mon = bcd2bin(regs[5] & 0x1f) - 1; tm->tm_year = bcd2bin(regs[6]) + 100; - return rtc_valid_tm(tm); + return 0; } static int pcf8523_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-pic32.c b/drivers/rtc/rtc-pic32.c index 5cfb6df5c430..3c08eab4f1a8 100644 --- a/drivers/rtc/rtc-pic32.c +++ b/drivers/rtc/rtc-pic32.c @@ -175,7 +175,7 @@ static int pic32_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); clk_disable(pdata->clk); - return rtc_valid_tm(rtc_tm); + return 0; } static int pic32_rtc_settime(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c index b6c5eb97051c..a39ccd1cf6e8 100644 --- a/drivers/rtc/rtc-r9701.c +++ b/drivers/rtc/rtc-r9701.c @@ -92,7 +92,7 @@ static int r9701_get_datetime(struct device *dev, struct rtc_time *dt) * according to the data sheet. make sure they are valid. */ - return rtc_valid_tm(dt); + return 0; } static int r9701_set_datetime(struct device *dev, struct rtc_time *dt) diff --git a/drivers/rtc/rtc-rp5c01.c b/drivers/rtc/rtc-rp5c01.c index 043b1667b41a..f1c160fe7d37 100644 --- a/drivers/rtc/rtc-rp5c01.c +++ b/drivers/rtc/rtc-rp5c01.c @@ -115,7 +115,7 @@ static int rp5c01_read_time(struct device *dev, struct rtc_time *tm) rp5c01_unlock(priv); spin_unlock_irq(&priv->lock); - return rtc_valid_tm(tm); + return 0; } static int rp5c01_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-rx6110.c b/drivers/rtc/rtc-rx6110.c index 7c9c08eab5e5..8e322d884cc2 100644 --- a/drivers/rtc/rtc-rx6110.c +++ b/drivers/rtc/rtc-rx6110.c @@ -252,7 +252,7 @@ static int rx6110_get_time(struct device *dev, struct rtc_time *tm) tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon, tm->tm_year); - return rtc_valid_tm(tm); + return 0; } static const struct reg_sequence rx6110_default_regs[] = { diff --git a/drivers/rtc/rtc-rx8010.c b/drivers/rtc/rtc-rx8010.c index 5c5938ab3d86..7ddc22eb5b0f 100644 --- a/drivers/rtc/rtc-rx8010.c +++ b/drivers/rtc/rtc-rx8010.c @@ -138,7 +138,7 @@ static int rx8010_get_time(struct device *dev, struct rtc_time *dt) dt->tm_year = bcd2bin(date[RX8010_YEAR - RX8010_SEC]) + 100; dt->tm_wday = ffs(date[RX8010_WDAY - RX8010_SEC] & 0x7f); - return rtc_valid_tm(dt); + return 0; } static int rx8010_set_time(struct device *dev, struct rtc_time *dt) diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c index 91857d8d2df8..41127adf5765 100644 --- a/drivers/rtc/rtc-rx8025.c +++ b/drivers/rtc/rtc-rx8025.c @@ -214,7 +214,7 @@ static int rx8025_get_time(struct device *dev, struct rtc_time *dt) dt->tm_sec, dt->tm_min, dt->tm_hour, dt->tm_mday, dt->tm_mon, dt->tm_year); - return rtc_valid_tm(dt); + return 0; } static int rx8025_set_time(struct device *dev, struct rtc_time *dt) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index a8992c227f61..75c8c5033e08 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -232,7 +232,7 @@ retry_get_time: rtc_tm->tm_mon -= 1; - return rtc_valid_tm(rtc_tm); + return 0; } static int s3c_rtc_settime(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c index 0477678d968f..6deae10c14ac 100644 --- a/drivers/rtc/rtc-s5m.c +++ b/drivers/rtc/rtc-s5m.c @@ -407,7 +407,7 @@ static int s5m_rtc_read_time(struct device *dev, struct rtc_time *tm) 1900 + tm->tm_year, 1 + tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, tm->tm_wday); - return rtc_valid_tm(tm); + return 0; } static int s5m_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index 6c2d3989f967..4e8ab370ce63 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c @@ -414,7 +414,7 @@ static int sh_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_wday); - return rtc_valid_tm(tm); + return 0; } static int sh_rtc_set_time(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c index 5bc28eed1adf..2e6fb275acc8 100644 --- a/drivers/rtc/rtc-sun6i.c +++ b/drivers/rtc/rtc-sun6i.c @@ -349,7 +349,7 @@ static int sun6i_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) */ rtc_tm->tm_year += SUN6I_YEAR_OFF; - return rtc_valid_tm(rtc_tm); + return 0; } static int sun6i_rtc_getalarm(struct device *dev, struct rtc_wkalrm *wkalrm) diff --git a/drivers/rtc/rtc-sunxi.c b/drivers/rtc/rtc-sunxi.c index abada609ddc7..dadbf8b324ad 100644 --- a/drivers/rtc/rtc-sunxi.c +++ b/drivers/rtc/rtc-sunxi.c @@ -261,7 +261,7 @@ static int sunxi_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) */ rtc_tm->tm_year += SUNXI_YEAR_OFF(chip->data_year); - return rtc_valid_tm(rtc_tm); + return 0; } static int sunxi_rtc_setalarm(struct device *dev, struct rtc_wkalrm *wkalrm) |