diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2021-01-11 00:17:40 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2021-01-16 23:19:26 +0100 |
commit | b0d42defe1c74c0df3342ae13d5283c0732ffacf (patch) | |
tree | a4ea2b50afb384ab50b8de52f6d5656749e20dc7 /drivers | |
parent | 30f5bd537fdb6124b9955858b301577ce4eb8dcd (diff) | |
download | linux-b0d42defe1c74c0df3342ae13d5283c0732ffacf.tar.bz2 |
rtc: mv: remove mv_rtc_alarm_ops
Move the alarm callbacks in mv_rtc_ops and clear RTC_FEATURE_ALARM to
signal that alarms are not available instead of having a supplementary
struct rtc_class_ops.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210110231752.1418816-6-alexandre.belloni@bootlin.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/rtc/rtc-mv.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c index f8e2ecea1d8d..6c526e2ec56d 100644 --- a/drivers/rtc/rtc-mv.c +++ b/drivers/rtc/rtc-mv.c @@ -200,11 +200,6 @@ static irqreturn_t mv_rtc_interrupt(int irq, void *data) static const struct rtc_class_ops mv_rtc_ops = { .read_time = mv_rtc_read_time, .set_time = mv_rtc_set_time, -}; - -static const struct rtc_class_ops mv_rtc_alarm_ops = { - .read_time = mv_rtc_read_time, - .set_time = mv_rtc_set_time, .read_alarm = mv_rtc_read_alarm, .set_alarm = mv_rtc_set_alarm, .alarm_irq_enable = mv_rtc_alarm_irq_enable, @@ -268,13 +263,12 @@ static int __init mv_rtc_probe(struct platform_device *pdev) } } - if (pdata->irq >= 0) { + if (pdata->irq >= 0) device_init_wakeup(&pdev->dev, 1); - pdata->rtc->ops = &mv_rtc_alarm_ops; - } else { - pdata->rtc->ops = &mv_rtc_ops; - } + else + clear_bit(RTC_FEATURE_ALARM, pdata->rtc->features); + pdata->rtc->ops = &mv_rtc_ops; pdata->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; pdata->rtc->range_max = RTC_TIMESTAMP_END_2099; |