From a127505cd05fa7725c7aa890d23b21dfed63eabf Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Mon, 19 Oct 2026 23:18:15 +0200 Subject: [PATCH] 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 --- 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; }