rtc: 88pm860x: remove useless range check
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 15 Apr 2020 20:02:26 +0000 (22:02 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sat, 18 Apr 2020 20:42:06 +0000 (22:42 +0200)
Because the core is now checking the RTC range, it is unnecessary to check
it again in .set_time/

Link: https://lore.kernel.org/r/20200415200226.157361-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-88pm860x.c

index cc9b14ef90f10af5044da792412c5b8ff5544d52..c90457d001e953d4615914ae57534e70e630026f 100644 (file)
@@ -106,12 +106,6 @@ static int pm860x_rtc_set_time(struct device *dev, struct rtc_time *tm)
        unsigned char buf[4];
        unsigned long ticks, base, data;
 
-       if (tm->tm_year > 206) {
-               dev_dbg(info->dev, "Set time %d out of range. "
-                       "Please set time between 1970 to 2106.\n",
-                       1900 + tm->tm_year);
-               return -EINVAL;
-       }
        ticks = rtc_tm_to_time64(tm);
 
        /* load 32-bit read-only counter */