Commit d1f2c82f authored by Horatiu Vultur's avatar Horatiu Vultur Committed by Linus Walleij

pinctrl: ocelot: Fix interrupt parsing

In the blamed commit, it removes the duplicate of_node assignment in the
driver. But the driver uses this before calling into of_gpio_dev_init to
determine if it needs to assign an IRQ chip to the GPIO. The fixes
consists in using the platform_get_irq_optional

Fixes: 8a8d6bbe ("pinctrl: Get rid of duplicate of_node assignment in the drivers")
Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
Link: https://lore.kernel.org/r/20220304144432.3397621-3-horatiu.vultur@microchip.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f5141ae4
...@@ -1851,8 +1851,8 @@ static int ocelot_gpiochip_register(struct platform_device *pdev, ...@@ -1851,8 +1851,8 @@ static int ocelot_gpiochip_register(struct platform_device *pdev,
gc->base = -1; gc->base = -1;
gc->label = "ocelot-gpio"; gc->label = "ocelot-gpio";
irq = irq_of_parse_and_map(gc->of_node, 0); irq = platform_get_irq_optional(pdev, 0);
if (irq) { if (irq > 0) {
girq = &gc->irq; girq = &gc->irq;
girq->chip = &ocelot_irqchip; girq->chip = &ocelot_irqchip;
girq->parent_handler = ocelot_irq_handler; girq->parent_handler = ocelot_irq_handler;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment