Skip to content

Commit 63c7bc5

Browse files
dthompsoBartosz Golaszewski
authored andcommitted
gpio: mlxbf2: use platform_get_irq_optional()
The gpio-mlxbf2 driver interfaces with four GPIO controllers, device instances 0-3. There are two IRQ resources shared between the four controllers, and they are found in the ACPI table for instances 0 and 3. The driver should not use platform_get_irq(), otherwise this error is logged when probing instances 1 and 2: mlxbf2_gpio MLNXBF22:01: error -ENXIO: IRQ index 0 not found Fixes: 2b72526 ("gpio: mlxbf2: Introduce IRQ support") Cc: [email protected] Signed-off-by: David Thompson <[email protected]> Reviewed-by: Shravan Kumar Ramani <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent b644c64 commit 63c7bc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpio-mlxbf2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ mlxbf2_gpio_probe(struct platform_device *pdev)
397397
gc->ngpio = npins;
398398
gc->owner = THIS_MODULE;
399399

400-
irq = platform_get_irq(pdev, 0);
400+
irq = platform_get_irq_optional(pdev, 0);
401401
if (irq >= 0) {
402402
girq = &gs->gc.irq;
403403
gpio_irq_chip_set_chip(girq, &mlxbf2_gpio_irq_chip);

0 commit comments

Comments
 (0)