Skip to contentSkip to conversation

pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go

PATCH In review Martin Kaiser 4 participants 5 messages Nov 8, 2020 – Nov 11, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go

Replace the two separate calls for setting the irq handler and data with a single irq_set_chained_handler_and_data() call.

---
 drivers/pinctrl/pinctrl-at91-pio4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/pinctrl-at91-pio4.c +2 -2
index 578b387100d9..157fea808629 100644
@@ -1127,8 +1127,8 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
 			return -EINVAL;
 		}
 		atmel_pioctrl->irqs[i] = res->start;
-		irq_set_chained_handler(res->start, atmel_gpio_irq_handler);
-		irq_set_handler_data(res->start, atmel_pioctrl);
+		irq_set_chained_handler_and_data(res->start,
+			atmel_gpio_irq_handler, atmel_pioctrl);
 		dev_dbg(dev, "bank %i: irq=%pr\n", i, res);
 	}
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 3 lines · Martin Kaiser

Replace the two separate calls for setting the irq handler and data with a single irq_set_chained_handler_and_data() call.

Can it be rewritten to use the GPIO core facility of instantiating IRQ chip?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#2 lore raw
Quoted 6 lines · Andy Shevchenko
Quoted 3 lines · Martin Kaiser

Replace the two separate calls for setting the irq handler and data with a single irq_set_chained_handler_and_data() call.

Can it be rewritten to use the GPIO core facility of instantiating IRQ chip?

I have the feeling it's out of scope for this (tiny) patch.

Regards,

Signature · 1 line
Nicolas Ferre
#3 lore raw
Quoted 9 lines · Nicolas Ferre
Quoted 6 lines · Andy Shevchenko
Quoted 3 lines · Martin Kaiser

Replace the two separate calls for setting the irq handler and data with a single irq_set_chained_handler_and_data() call.

Can it be rewritten to use the GPIO core facility of instantiating IRQ chip?

I have the feeling it's out of scope for this (tiny) patch.

True, but a good suggestion anyways.

If you have a TODO for the AT91 pin controllers I think both using the GPIOLIB_IRQCHIP can cut down
the code in these files quite a bit, and probably fix some unknown bugs.

Yours,
Linus Walleij