mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
rtc: stm32: use guard
Use guard() to simplify locking Link: https://patch.msgid.link/20261019211827.126262-18-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
eff3e65cdc
commit
3d9796708c
|
|
@ -465,7 +465,7 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id)
|
|||
const struct stm32_rtc_events *evts = &rtc->data->events;
|
||||
unsigned int status, cr;
|
||||
|
||||
rtc_lock(rtc->rtc_dev);
|
||||
guard(rtc_ops)(rtc->rtc_dev);
|
||||
|
||||
status = readl_relaxed(rtc->base + regs->sr);
|
||||
cr = readl_relaxed(rtc->base + regs->cr);
|
||||
|
|
@ -482,8 +482,6 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id)
|
|||
stm32_rtc_clear_event_flags(rtc, evts->alra);
|
||||
}
|
||||
|
||||
rtc_unlock(rtc->rtc_dev);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user