Skip to content

Commit 810bd90

Browse files
dthompsoBartosz Golaszewski
authored andcommitted
gpio: mlxbf3: use platform_get_irq_optional()
The gpio-mlxbf3 driver interfaces with two GPIO controllers, device instance 0 and 1. There is a single IRQ resource shared between the two controllers, and it is found in the ACPI table for device instance 0. The driver should not use platform_get_irq(), otherwise this error is logged when probing instance 1: mlxbf3_gpio MLNXBF33:01: error -ENXIO: IRQ index 0 not found Cc: [email protected] Fixes: cd33f21 ("gpio: mlxbf3: Add gpio driver support") Signed-off-by: David Thompson <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/ce70b98a201ce82b9df9aa80ac7a5eeaa2268e52.1754928650.git.davthompson@nvidia.com Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 56bdf72 commit 810bd90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpio-mlxbf3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static int mlxbf3_gpio_probe(struct platform_device *pdev)
227227
gc->owner = THIS_MODULE;
228228
gc->add_pin_ranges = mlxbf3_gpio_add_pin_ranges;
229229

230-
irq = platform_get_irq(pdev, 0);
230+
irq = platform_get_irq_optional(pdev, 0);
231231
if (irq >= 0) {
232232
girq = &gs->gc.irq;
233233
gpio_irq_chip_set_chip(girq, &gpio_mlxbf3_irqchip);

0 commit comments

Comments
 (0)