pinctrl: starfive: Use existing variable gpio
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 21 Nov 2022 15:50:58 +0000 (16:50 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 22 Nov 2022 08:25:30 +0000 (09:25 +0100)
Use the existing variable "gpio", instead of obtaining the hwirq number
again.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Link: https://lore.kernel.org/r/3b6b8597792a393d0f21b8489dd933663dfd2b90.1669045778.git.geert+renesas@glider.be
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c

index a90b770821d6ebd03b77a00e6f0ed3db2c81d28c..530fe340a9a154ad01bb6109ef764a2839ac8a77 100644 (file)
@@ -1082,7 +1082,7 @@ static void starfive_irq_mask(struct irq_data *d)
        writel_relaxed(value, ie);
        raw_spin_unlock_irqrestore(&sfp->lock, flags);
 
-       gpiochip_disable_irq(&sfp->gc, d->hwirq);
+       gpiochip_disable_irq(&sfp->gc, gpio);
 }
 
 static void starfive_irq_mask_ack(struct irq_data *d)
@@ -1111,7 +1111,7 @@ static void starfive_irq_unmask(struct irq_data *d)
        unsigned long flags;
        u32 value;
 
-       gpiochip_enable_irq(&sfp->gc, d->hwirq);
+       gpiochip_enable_irq(&sfp->gc, gpio);
 
        raw_spin_lock_irqsave(&sfp->lock, flags);
        value = readl_relaxed(ie) | mask;