Message ID | 162076155630.29796.6492074988685235162.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers | show |
Series | [tip:,timers/urgent] alarmtimer: Check RTC features instead of ops | expand |
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index bea9d08..5897828 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;