]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
irqchip/renesas-rzg2l: Replace raw_spin_{lock,unlock} with guard() in rzg2l_irq_set_t...
authorBiju Das <biju.das.jz@bp.renesas.com>
Sat, 28 Mar 2026 10:33:19 +0000 (10:33 +0000)
committerThomas Gleixner <tglx@kernel.org>
Sat, 28 Mar 2026 13:14:51 +0000 (14:14 +0100)
Simplify the locking logic in rzg2l_irq_set_type() by using guard(),
eliminating the need for an explicit unlock call.

[ tglx: Remove the pointless cleanup.h include. The spinlock guards come
   from spinlock.h ]

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260328103324.134131-3-biju.das.jz@bp.renesas.com
drivers/irqchip/irq-renesas-rzg2l.c

index f5c4d7e0aec3807ba21eb860f0e4973dd1dd2f96..755fac39de0ca523fbab82ff0ee265431a32b6a9 100644 (file)
@@ -373,14 +373,13 @@ static int rzg2l_irq_set_type(struct irq_data *d, unsigned int type)
                return -EINVAL;
        }
 
-       raw_spin_lock(&priv->lock);
+       guard(raw_spinlock)(&priv->lock);
        tmp = readl_relaxed(priv->base + IITSR);
        tmp &= ~IITSR_IITSEL_MASK(iitseln);
        tmp |= IITSR_IITSEL(iitseln, sense);
        if (clear_irq_int)
                rzg2l_clear_irq_int(priv, hwirq);
        writel_relaxed(tmp, priv->base + IITSR);
-       raw_spin_unlock(&priv->lock);
 
        return 0;
 }