summaryrefslogtreecommitdiff
path: root/drivers/rtc/sysfs.c
diff options
context:
space:
mode:
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,