* [PATCH] gpiolib: use irq_domain_alloc_irqs()
@ 2022-12-13 13:52 Johan Hovold
2022-12-15 13:07 ` Linus Walleij
2022-12-30 10:08 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Johan Hovold @ 2022-12-13 13:52 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski; +Cc: linux-gpio, linux-kernel, Johan Hovold
Use the irq_domain_alloc_irqs() wrapper instead of the full
__irq_domain_alloc_irqs() interface, which was only intended for some
legacy (x86) use cases.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
drivers/gpio/gpiolib.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 5a66d9616d7c..ede9630b197c 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1126,14 +1126,8 @@ static void gpiochip_set_hierarchical_irqchip(struct gpio_chip *gc,
/* Just pick something */
fwspec.param[1] = IRQ_TYPE_EDGE_RISING;
fwspec.param_count = 2;
- ret = __irq_domain_alloc_irqs(gc->irq.domain,
- /* just pick something */
- -1,
- 1,
- NUMA_NO_NODE,
- &fwspec,
- false,
- NULL);
+ ret = irq_domain_alloc_irqs(gc->irq.domain, 1,
+ NUMA_NO_NODE, &fwspec);
if (ret < 0) {
chip_err(gc,
"can not allocate irq for GPIO line %d parent hwirq %d in hierarchy domain: %d\n",
--
2.37.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpiolib: use irq_domain_alloc_irqs()
2022-12-13 13:52 [PATCH] gpiolib: use irq_domain_alloc_irqs() Johan Hovold
@ 2022-12-15 13:07 ` Linus Walleij
2022-12-30 10:08 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2022-12-15 13:07 UTC (permalink / raw)
To: Johan Hovold; +Cc: Bartosz Golaszewski, linux-gpio, linux-kernel
On Tue, Dec 13, 2022 at 2:52 PM Johan Hovold <johan+linaro@kernel.org> wrote:
> Use the irq_domain_alloc_irqs() wrapper instead of the full
> __irq_domain_alloc_irqs() interface, which was only intended for some
> legacy (x86) use cases.
>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Also semantically identical as can be seen from <linux/irqdomain.h>
I don't know what I was thinking.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpiolib: use irq_domain_alloc_irqs()
2022-12-13 13:52 [PATCH] gpiolib: use irq_domain_alloc_irqs() Johan Hovold
2022-12-15 13:07 ` Linus Walleij
@ 2022-12-30 10:08 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2022-12-30 10:08 UTC (permalink / raw)
To: Johan Hovold; +Cc: Linus Walleij, linux-gpio, linux-kernel
On Tue, Dec 13, 2022 at 2:52 PM Johan Hovold <johan+linaro@kernel.org> wrote:
>
> Use the irq_domain_alloc_irqs() wrapper instead of the full
> __irq_domain_alloc_irqs() interface, which was only intended for some
> legacy (x86) use cases.
>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
> drivers/gpio/gpiolib.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index 5a66d9616d7c..ede9630b197c 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -1126,14 +1126,8 @@ static void gpiochip_set_hierarchical_irqchip(struct gpio_chip *gc,
> /* Just pick something */
> fwspec.param[1] = IRQ_TYPE_EDGE_RISING;
> fwspec.param_count = 2;
> - ret = __irq_domain_alloc_irqs(gc->irq.domain,
> - /* just pick something */
> - -1,
> - 1,
> - NUMA_NO_NODE,
> - &fwspec,
> - false,
> - NULL);
> + ret = irq_domain_alloc_irqs(gc->irq.domain, 1,
> + NUMA_NO_NODE, &fwspec);
> if (ret < 0) {
> chip_err(gc,
> "can not allocate irq for GPIO line %d parent hwirq %d in hierarchy domain: %d\n",
> --
> 2.37.4
>
Applied, thanks!
Bart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-30 10:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-13 13:52 [PATCH] gpiolib: use irq_domain_alloc_irqs() Johan Hovold
2022-12-15 13:07 ` Linus Walleij
2022-12-30 10:08 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).