diff options
| author | Dmitry Torokhov <[email protected]> | 2021-05-04 11:46:00 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2021-05-04 11:46:00 -0700 |
| commit | d0034a7a4ac7fae708146ac0059b9c47a1543f0d (patch) | |
| tree | ac3ac88066f0f80632aa754e3ae008994f2426a2 /drivers/rtc/class.c | |
| parent | 56cfe6f820a6315291eb5a1b82bb49633b993d3b (diff) | |
| parent | d12b64b9764ea17554fb230784ebf91287ed807e (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 5.13 merge window.
Diffstat (limited to 'drivers/rtc/class.c')
| -rw-r--r-- | drivers/rtc/class.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 7e470fbd5e4d..f77bc089eb6b 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -231,6 +231,8 @@ static struct rtc_device *rtc_allocate_device(void) rtc->pie_timer.function = rtc_pie_update_irq; rtc->pie_enabled = 0; + set_bit(RTC_FEATURE_ALARM, rtc->features); + return rtc; } @@ -322,11 +324,6 @@ static void rtc_device_get_offset(struct rtc_device *rtc) rtc->offset_secs = 0; } -/** - * rtc_device_unregister - removes the previously registered RTC class device - * - * @rtc: the RTC class device to destroy - */ static void devm_rtc_unregister_device(void *data) { struct rtc_device *rtc = data; @@ -386,6 +383,9 @@ int __devm_rtc_register_device(struct module *owner, struct rtc_device *rtc) return -EINVAL; } + if (!rtc->ops->set_alarm) + clear_bit(RTC_FEATURE_ALARM, rtc->features); + rtc->owner = owner; rtc_device_get_offset(rtc); |