From: Claudiu Beznea Date: Wed, 3 Jun 2026 15:16:37 +0000 (+0300) Subject: pinctrl: renesas: rzg2l: Use raw_spinlock_irqsave() on power source update X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14270179806b876fecefcbf35905e512b56a5867;p=thirdparty%2Flinux.git pinctrl: renesas: rzg2l: Use raw_spinlock_irqsave() on power source update The rest of the driver uses raw_spin_lock_irqsave() and raw_spin_unlock_irqrestore() for locking. To avoid concurrency issues or deadlocks, use raw_spinlock_irqsave() via the scoped_guard() helper for power source updates as well. Fixes: bbe2277dedbe ("pinctrl: renesas: rzg2l: Add support for selecting power source for {WDT,AWO,ISO}") Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20260603151642.4075678-2-claudiu.beznea@kernel.org Signed-off-by: Geert Uytterhoeven --- diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 83c61dcb24b15..be52d47d77ae2 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -1137,7 +1137,7 @@ static int rzg2l_set_power_source(struct rzg2l_pinctrl *pctrl, u32 pin, u32 caps return pwr_reg; if (pwr_reg == OTHER_POC) { - scoped_guard(raw_spinlock, &pctrl->lock) { + scoped_guard(raw_spinlock_irqsave, &pctrl->lock) { val = readb(pctrl->base + pwr_reg); if (poc_val) val |= mask;