diff mbox series

[resend] pinctrl: starfive: Use existing variable gpio

Message ID 3b6b8597792a393d0f21b8489dd933663dfd2b90.1669045778.git.geert+renesas@glider.be
State New
Headers show
Series [resend] pinctrl: starfive: Use existing variable gpio | expand

Commit Message

Geert Uytterhoeven Nov. 21, 2022, 3:50 p.m. UTC
Use the existing variable "gpio", instead of obtaining the hwirq number
again.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Emil Renner Berthing Nov. 21, 2022, 7:49 p.m. UTC | #1
On Mon, 21 Nov 2022 at 16:51, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> Use the existing variable "gpio", instead of obtaining the hwirq number
> again.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Thanks!
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>

> ---
>  drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
> index bdf61cfd143a5120..6fe5e1e9baa9b20a 100644
> --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
> +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
> @@ -1086,7 +1086,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)
> @@ -1115,7 +1115,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;
> --
> 2.25.1
>
Linus Walleij Nov. 22, 2022, 8:25 a.m. UTC | #2
On Mon, Nov 21, 2022 at 4:51 PM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:

> Use the existing variable "gpio", instead of obtaining the hwirq number
> again.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Patch applied.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
index bdf61cfd143a5120..6fe5e1e9baa9b20a 100644
--- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
@@ -1086,7 +1086,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)
@@ -1115,7 +1115,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;