mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
rtc: ds1685: use guard
Use guard() to simplify locking Link: https://patch.msgid.link/20261019211827.126262-8-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
0d1e6c4a0c
commit
5162e9ad18
|
|
@ -666,7 +666,7 @@ ds1685_rtc_irq_handler(int irq, void *dev_id)
|
|||
if (unlikely(!rtc))
|
||||
return IRQ_HANDLED;
|
||||
|
||||
rtc_lock(rtc->dev);
|
||||
guard(rtc_ops)(rtc->dev);
|
||||
|
||||
/* Ctrlb holds the interrupt-enable bits and ctrlc the flag bits. */
|
||||
ctrlb = rtc->read(rtc, RTC_CTRL_B);
|
||||
|
|
@ -711,7 +711,6 @@ ds1685_rtc_irq_handler(int irq, void *dev_id)
|
|||
}
|
||||
}
|
||||
rtc_update_irq(rtc->dev, num_irqs, events);
|
||||
rtc_unlock(rtc->dev);
|
||||
|
||||
return events ? IRQ_HANDLED : IRQ_NONE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user