Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: rv8803: let the core handle range

Let the core handle the RTC range instead of open coding it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

+2 -3
+2 -3
drivers/rtc/rtc-rv8803.c
··· 236 236 u8 date[7]; 237 237 int ctrl, flags, ret; 238 238 239 - if ((tm->tm_year < 100) || (tm->tm_year > 199)) 240 - return -EINVAL; 241 - 242 239 ctrl = rv8803_read_reg(rv8803->client, RV8803_CTRL); 243 240 if (ctrl < 0) 244 241 return ctrl; ··· 599 602 600 603 rv8803->rtc->ops = &rv8803_rtc_ops; 601 604 rv8803->rtc->nvram_old_abi = true; 605 + rv8803->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; 606 + rv8803->rtc->range_max = RTC_TIMESTAMP_END_2099; 602 607 err = rtc_register_device(rv8803->rtc); 603 608 if (err) 604 609 return err;