Skip to contentSkip to conversation

gpiolib: use irq_domain_alloc_irqs()

PATCH Applied Johan Hovold 3 participants 3 messages Dec 13, 2022 – Dec 30, 2022 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpiolib: use irq_domain_alloc_irqs()

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.

---
 drivers/gpio/gpiolib.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/gpio/gpiolib.c +2 -8
index 5a66d9616d7c..ede9630b197c 100644
@@ -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",
Signature · 1 line
2.37.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · 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.

Also semantically identical as can be seen from <linux/irqdomain.h> I don't know what I was thinking.

Yours,
Linus Walleij

#2 lore raw
In reply to Johan Hovold
Quoted 32 lines · 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.

---
 drivers/gpio/gpiolib.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/gpio/gpiolib.c +2 -9
index 5a66d9616d7c..ede9630b197c 100644
@@ -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",
--
Quoted 2 lines

2.37.4

Applied, thanks!

Bart