提交 d9b0dd54 编写于 作者: A Alexandre Belloni

rtc: pl031: use RTC_FEATURE_ALARM

Clear RTC_FEATURE_ALARM instead of setting set_alarm, read_alarm and
alarm_irq_enable to NULL.
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210110231752.1418816-3-alexandre.belloni@bootlin.com
上级 7ae41220
...@@ -352,12 +352,8 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id) ...@@ -352,12 +352,8 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
} }
} }
if (!adev->irq[0]) { if (!adev->irq[0])
/* When there's no interrupt, no point in exposing the alarm */ clear_bit(RTC_FEATURE_ALARM, ldata->rtc->features);
ops->read_alarm = NULL;
ops->set_alarm = NULL;
ops->alarm_irq_enable = NULL;
}
device_init_wakeup(&adev->dev, true); device_init_wakeup(&adev->dev, true);
ldata->rtc = devm_rtc_allocate_device(&adev->dev); ldata->rtc = devm_rtc_allocate_device(&adev->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册