diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-12-03 13:31:08 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-12-03 13:31:08 -0800 |
commit | 4672c2f2026dbc46b20647803426561fe2d460ea (patch) | |
tree | 78413e5b57ea4a47099d8f636c57f161a8322f1f /drivers/rtc/rtc-m41t80.c | |
parent | 2a31aca5006749f7d4655836c61d4a53bfae8e53 (diff) | |
parent | f830f7cf4752f6f0db48777b7e16c010bdc95083 (diff) | |
download | linux-4672c2f2026dbc46b20647803426561fe2d460ea.tar.bz2 |
Merge tag 'rtc-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni:
"A lot of unnecessary code removal in here that ends up decreasing the
number of lines in the subsystem. The ds1343 and ds1347 drivers got
cleaned up. The rest are the usual fixes and new features.
Subsystem:
- fix warnings and errors with make W=1
- UIE are now disabled while setting the RTC time
- UIE are now disallowed when the RTC time is not set.
Drivers:
- remove unecessary .remove callbacks
- Set RTC range for cros-ec, ds1343, ds1347, m41t80, s35390a, vt8500
- Use devm_platform_ioremap_resource where applicable
- rv3028: add clock out support"
* tag 'rtc-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (81 commits)
rtc: Fix Kconfig indentation
rtc: xgene: Remove unused struct device in struct xgene_rtc_dev
rtc: sun6i: Remove struct device from sun6i_rtc_dev
rtc: st-lpc: Remove struct resource from struct st_rtc
rtc: pcf8523: Remove struct pcf8523
rtc: meson: remove redundant assignment to variable retries
rtc: v3020: remove set but unused variable
rtc: tegra: remove set but unused variable
rtc: pm8xxx: update kerneldoc for struct pm8xxx_rtc
rtc: m41t80: remove excess kerneldoc
rtc: ds1685: fix build error with make W=1
rtc: ds1685: remove set but unused variables
rtc: ds1374: remove unused variable
rtc: sysfs: fix hctosys_show kerneldoc
rtc: interface: fix kerneldoc comments
rtc: msm6242: Remove unneeded msm6242_set()/msm6242_clear() functions
rtc: msm6242: Fix reading of 10-hour digit
rtc: tps65910: allow using RTC without alarm interrupt
rtc: fsl-ftm-alarm: remove select FSL_RCPM and default y from Kconfig
rtc: pcf8563: Constify clkout_rates
...
Diffstat (limited to 'drivers/rtc/rtc-m41t80.c')
-rw-r--r-- | drivers/rtc/rtc-m41t80.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c index f9fa4f068de3..9b70b371bd0c 100644 --- a/drivers/rtc/rtc-m41t80.c +++ b/drivers/rtc/rtc-m41t80.c @@ -235,9 +235,6 @@ static int m41t80_rtc_set_time(struct device *dev, struct rtc_time *tm) unsigned char buf[8]; int err, flags; - if (tm->tm_year < 100 || tm->tm_year > 199) - return -EINVAL; - buf[M41T80_REG_SSEC] = 0; buf[M41T80_REG_SEC] = bin2bcd(tm->tm_sec); buf[M41T80_REG_MIN] = bin2bcd(tm->tm_min); @@ -705,7 +702,6 @@ static ssize_t wdt_read(struct file *file, char __user *buf, /** * wdt_ioctl: - * @inode: inode of the device * @file: file handle to the device * @cmd: watchdog command * @arg: argument pointer @@ -926,6 +922,8 @@ static int m41t80_probe(struct i2c_client *client, } m41t80_data->rtc->ops = &m41t80_rtc_ops; + m41t80_data->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; + m41t80_data->rtc->range_max = RTC_TIMESTAMP_END_2099; if (client->irq <= 0) { /* We cannot support UIE mode if we do not have an IRQ line */ |