[SRU][J:linux-bluefield][PATCH v1 1/1] gpio: mlxbf3: use platform_get_irq_optional()
David Thompson
davthompson at nvidia.com
Wed Aug 13 19:38:06 UTC 2025
BugLink: https://bugs.launchpad.net/bugs/2120583
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: stable at vger.kernel.org
Fixes: cd33f216d241 ("gpio: mlxbf3: Add gpio driver support")
Signed-off-by: David Thompson <davthompson at nvidia.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Link: https://lore.kernel.org/r/ce70b98a201ce82b9df9aa80ac7a5eeaa2268e52.1754928650.git.davthompson@nvidia.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
(cherry picked from commit 810bd9066fb1871b8a9528f31f2fdbf2a8b73bf2 linux-next)
Signed-off-by: David Thompson <davthompson at nvidia.com>
---
drivers/gpio/gpio-mlxbf3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-mlxbf3.c b/drivers/gpio/gpio-mlxbf3.c
index e3c708cef2a8..b84a05b82ed5 100644
--- a/drivers/gpio/gpio-mlxbf3.c
+++ b/drivers/gpio/gpio-mlxbf3.c
@@ -243,7 +243,7 @@ static int mlxbf3_gpio_probe(struct platform_device *pdev)
gc->add_pin_ranges = mlxbf3_gpio_add_pin_ranges;
gc->init_valid_mask = mlxbf3_gpio_init_valid_mask;
- irq = platform_get_irq(pdev, 0);
+ irq = platform_get_irq_optional(pdev, 0);
if (irq >= 0) {
girq = &gs->gc.irq;
girq->chip = &gpio_mlxbf3_irqchip;
--
2.43.2
More information about the kernel-team
mailing list