summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-pl031.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2021-01-11 00:17:37 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2021-01-16 23:19:26 +0100
commitd9b0dd54a1943f47a381a474f8ea2c94466110c0 (patch)
tree4277955187ab506d7b787d63c9360c96bb1fbd10 /drivers/rtc/rtc-pl031.c
parent7ae41220ef5831674f446baef19bfe1b31358260 (diff)
downloadlwn-d9b0dd54a1943f47a381a474f8ea2c94466110c0.tar.gz
lwn-d9b0dd54a1943f47a381a474f8ea2c94466110c0.zip
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: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210110231752.1418816-3-alexandre.belloni@bootlin.com
Diffstat (limited to 'drivers/rtc/rtc-pl031.c')
-rw-r--r--drivers/rtc/rtc-pl031.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index 224bbf096262..7c3967df4f9a 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -352,12 +352,8 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
}
}
- if (!adev->irq[0]) {
- /* When there's no interrupt, no point in exposing the alarm */
- ops->read_alarm = NULL;
- ops->set_alarm = NULL;
- ops->alarm_irq_enable = NULL;
- }
+ if (!adev->irq[0])
+ clear_bit(RTC_FEATURE_ALARM, ldata->rtc->features);
device_init_wakeup(&adev->dev, true);
ldata->rtc = devm_rtc_allocate_device(&adev->dev);