aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/rtc/sysfs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-05-03 12:15:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-05-03 12:15:21 -0700
commita7efd197bc7ff03076faf09d6325d7c3427893e3 (patch)
tree128b1c8f91b4b5c9f75d81e96041973329088b10 /drivers/rtc/sysfs.c
parentMerge tag 'trace-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace (diff)
parentrtc: sysfs: check features instead of ops (diff)
downloadwireguard-linux-a7efd197bc7ff03076faf09d6325d7c3427893e3.tar.xz
wireguard-linux-a7efd197bc7ff03076faf09d6325d7c3427893e3.zip
Merge tag 'rtc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni: "Mostly small fixes and two drivers gaining alarm support. Summary: Subsystem: - UIE emulation has been reworked to avoid calling driver callbacks when it is known it will not work Drivers: - ab-eoz9: add alarm support - pcf8523: add alarm support" * tag 'rtc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (27 commits) rtc: sysfs: check features instead of ops rtc: omap: use rtc_write to access OMAP_RTC_OSC_REG rtc: s5m: Remove reference to parent's device pdata rtc: ds1307: Fix wday settings for rx8130 rtc: pcf8523: report oscillator failures rtc: pcf8523: add alarm support rtc: pcf8523: remove useless define rtc: rtc_update_irq_enable: rework UIE emulation rtc: ds1307: remove flags rtc: ds1307: replace HAS_ALARM by RTC_FEATURE_ALARM rtc: imx-sc: remove .read_alarm rtc: ds1511: remove unused function rtc: fsl-ftm-alarm: add MODULE_TABLE() rtc: rtc-spear: replace spin_lock_irqsave by spin_lock in hard IRQ dt-bindings: rtc: qcom-pm8xxx-rtc: Add qcom pm8xxx rtc bindings rtc: pm8xxx: Add RTC support for PMIC PMK8350 rtc: ab-eoz9: make use of RTC_FEATURE_ALARM rtc: ab-eoz9: add alarm support rtc: ab-eoz9: set regmap max_register rtc: pcf85063: fallback to parent of_node ...
Diffstat (limited to 'drivers/rtc/sysfs.c')
-rw-r--r--drivers/rtc/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/sysfs.c b/drivers/rtc/sysfs.c
index 8a957d31a1a4..74026f67fdfb 100644
--- a/drivers/rtc/sysfs.c
+++ b/drivers/rtc/sysfs.c
@@ -273,7 +273,7 @@ static bool rtc_does_wakealarm(struct rtc_device *rtc)
if (!device_can_wakeup(rtc->dev.parent))
return false;
- return rtc->ops->set_alarm != NULL;
+ return !!test_bit(RTC_FEATURE_ALARM, rtc->features);
}
static umode_t rtc_attr_is_visible(struct kobject *kobj,