diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-27 09:24:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-27 09:24:24 -0700 |
commit | c7b7eefa57ae3c8802fdec7d07ac4df6c49d1e7a (patch) | |
tree | 7aac7dee4d94113648b210fe9dc4ba181dfc1ccf /drivers/rtc/rtc-mv.c | |
parent | e5585453498907080c456ec5b51131867ed6d095 (diff) | |
parent | 3822d1bb0df18aa28930f19bc46e0704aea1be0f (diff) |
Merge tag 'rtc-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni:
"This cycle, there were mostly non urgent fixes in drivers. I also
finally unexported the non managed registration.
Subsystem:
- non devm managed registration is now removed from the driver API
- all the unnecessary rtc_valid_tm() calls have been removed
Drivers:
- abx80X: watchdog support
- cmos: fix non ACPI support
- sc27xx: fix alarm support
- Remove a possible sysfs race condition for ab8500, ds1307, ds1685,
isl1208
- Fix a possible race condition where an irq handler may be called
before the rtc_device struct is allocated for mt6397, pl030,
menelaus, armada38x"
* tag 'rtc-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (54 commits)
rtc: sc27xx: Always read normal alarm when registering RTC device
rtc: sc27xx: Add check to see if need to enable the alarm interrupt
rtc: sc27xx: Remove interrupts disable and clear in probe()
rtc: sc27xx: Clear SPG value update interrupt status
rtc: sc27xx: Set wakeup capability before registering rtc device
rtc: s35390a: Change buf's type to u8 in s35390a_init
rtc: ds1307: fix ds1339 wakealarm support
rtc: ds1685: simplify getting .driver_data
rtc: m41t80: mark expected switch fall-through
rtc: tegra: Propagate errors from platform_get_irq()
rtc: cmos: Remove the `use_acpi_alarm' module parameter for !ACPI
rtc: cmos: Fix non-ACPI undefined reference to `hpet_rtc_interrupt'
rtc: mv: let the core handle invalid alarms
rtc: vr41xx: switch to rtc_time64_to_tm/rtc_tm_to_time64
rtc: ab8500: remove useless check
rtc: ab8500: let the core handle range
rtc: ab8500: use rtc_add_group
rtc: rs5c348: report error when time is invalid
rtc: rs5c348: remove forward declaration
rtc: rs5c348: remove useless label
...
Diffstat (limited to 'drivers/rtc/rtc-mv.c')
-rw-r--r-- | drivers/rtc/rtc-mv.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c index 4b198b3778d3..e7f14bd12fe3 100644 --- a/drivers/rtc/rtc-mv.c +++ b/drivers/rtc/rtc-mv.c @@ -125,13 +125,9 @@ static int mv_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) /* hw counts from year 2000, but tm_year is relative to 1900 */ alm->time.tm_year = bcd2bin(year) + 100; - if (rtc_valid_tm(&alm->time) < 0) { - dev_err(dev, "retrieved alarm date/time is not valid.\n"); - rtc_time_to_tm(0, &alm->time); - } - alm->enabled = !!readl(ioaddr + RTC_ALARM_INTERRUPT_MASK_REG_OFFS); - return 0; + + return rtc_valid_tm(&alm->time); } static int mv_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) |