Skip to content

Commit d1f2c82

Browse files
HoratiuVulturLinus Walleij
authored andcommitted
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: 8a8d6bb ("pinctrl: Get rid of duplicate of_node assignment in the drivers") Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Link: https://lore.kernel.org/r/20220304144432.3397621-3-horatiu.vultur@microchip.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent f5141ae commit d1f2c82

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/pinctrl/pinctrl-ocelot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,8 +1851,8 @@ static int ocelot_gpiochip_register(struct platform_device *pdev,
18511851
gc->base = -1;
18521852
gc->label = "ocelot-gpio";
18531853

1854-
irq = irq_of_parse_and_map(gc->of_node, 0);
1855-
if (irq) {
1854+
irq = platform_get_irq_optional(pdev, 0);
1855+
if (irq > 0) {
18561856
girq = &gc->irq;
18571857
girq->chip = &ocelot_irqchip;
18581858
girq->parent_handler = ocelot_irq_handler;

0 commit comments

Comments
 (0)