* [PATCH v2] pinctrl: starfive: Use existing variable gpio
@ 2022-05-20 10:25 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2022-05-20 10:25 UTC (permalink / raw)
To: Emil Renner Berthing, Linus Walleij, Marc Zyngier
Cc: linux-gpio, linux-riscv, Geert Uytterhoeven
Use the existing variable "gpio", instead of obtaining the hwirq number
again.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Feel free to fold into commit 48bd5c381c4a750b ("pinctrl: starfive: Make
the irqchip immutable"), if possible.
---
drivers/pinctrl/pinctrl-starfive.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
index f82a72f8016f59cc..669aeb45d70dd57b 100644
--- a/drivers/pinctrl/pinctrl-starfive.c
+++ b/drivers/pinctrl/pinctrl-starfive.c
@@ -1079,7 +1079,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)
@@ -1108,7 +1108,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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v2] pinctrl: starfive: Use existing variable gpio
@ 2022-05-20 10:25 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2022-05-20 10:25 UTC (permalink / raw)
To: Emil Renner Berthing, Linus Walleij, Marc Zyngier
Cc: linux-gpio, linux-riscv, Geert Uytterhoeven
Use the existing variable "gpio", instead of obtaining the hwirq number
again.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Feel free to fold into commit 48bd5c381c4a750b ("pinctrl: starfive: Make
the irqchip immutable"), if possible.
---
drivers/pinctrl/pinctrl-starfive.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
index f82a72f8016f59cc..669aeb45d70dd57b 100644
--- a/drivers/pinctrl/pinctrl-starfive.c
+++ b/drivers/pinctrl/pinctrl-starfive.c
@@ -1079,7 +1079,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)
@@ -1108,7 +1108,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
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-20 10:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 10:25 [PATCH v2] pinctrl: starfive: Use existing variable gpio Geert Uytterhoeven
2022-05-20 10:25 ` Geert Uytterhoeven
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.