[PATCH 14/19] rtc: pcf2123: use guard
From: alexandre . belloni
Date: Mon Oct 19 2026 - 17:22:43 EST
From: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
Use guard() to simplify locking
Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
---
drivers/rtc/rtc-pcf2123.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c
index e714661e61a9..22c626d57090 100644
--- a/drivers/rtc/rtc-pcf2123.c
+++ b/drivers/rtc/rtc-pcf2123.c
@@ -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;
}
--
2.56.0