diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-05-16 18:42:13 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-05-16 18:42:13 +0200 |
commit | 8ce3648158d7bc9e5035d5a1db02c892905babbf (patch) | |
tree | c01f3911e705d9e4332a173ec0bce5d7d5252bea /kernel | |
parent | Merge tag 'for-linus-5.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
parent | clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86 (diff) | |
download | linux-8ce3648158d7bc9e5035d5a1db02c892905babbf.tar.xz linux-8ce3648158d7bc9e5035d5a1db02c892905babbf.zip |
Merge tag 'timers-urgent-2021-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner:
"Two fixes for timers:
- Use the ALARM feature check in the alarmtimer core code insted of
the old method of checking for the set_alarm() callback.
Drivers can have that callback set but the feature bit cleared. If
such a RTC device is selected then alarms wont work.
- Use a proper define to let the preprocessor check whether Hyper-V
VDSO clocksource should be active.
The code used a constant in an enum with #ifdef, which evaluates to
always false and disabled the clocksource for VDSO"
* tag 'timers-urgent-2021-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86
alarmtimer: Check RTC features instead of ops
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/alarmtimer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index bea9d08b1698..5897828b9d7e 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -92,7 +92,7 @@ static int alarmtimer_rtc_add_device(struct device *dev, if (rtcdev) return -EBUSY; - if (!rtc->ops->set_alarm) + if (!test_bit(RTC_FEATURE_ALARM, rtc->features)) return -1; if (!device_may_wakeup(rtc->dev.parent)) return -1; |