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:
Alexandre Belloni 2026-10-19 23:18:15 +02:00
parent ea0e1e3094
commit a127505cd0

View File

@ -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;
}