mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
rtc: pcf2123: use guard
Use guard() to simplify locking Link: https://patch.msgid.link/20261019211827.126262-14-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
ea0e1e3094
commit
a127505cd0
|
|
@ -310,7 +310,8 @@ static irqreturn_t pcf2123_rtc_irq(int irq, void *dev)
|
|||
unsigned int val = 0;
|
||||
int ret = IRQ_NONE;
|
||||
|
||||
rtc_lock(pcf2123->rtc);
|
||||
guard(rtc_ops)(pcf2123->rtc);
|
||||
|
||||
regmap_read(pcf2123->map, PCF2123_REG_CTRL2, &val);
|
||||
|
||||
/* Alarm? */
|
||||
|
|
@ -323,8 +324,6 @@ static irqreturn_t pcf2123_rtc_irq(int irq, void *dev)
|
|||
rtc_update_irq(pcf2123->rtc, 1, RTC_IRQF | RTC_AF);
|
||||
}
|
||||
|
||||
rtc_unlock(pcf2123->rtc);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user