ACPI static fwnodes types are not contemplated in the current
platform_get_irq_affinity()
implementation that is there to retrieve and map IRQs for a device.
Add fwnode_irq_get() to platform_get_irq_affinity() for static ACPI fwnodes
to overcome this shortcoming, enabling IRQ retrieval and mapping for the
ACPI static fwnode type.
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Danilo Krummrich <dakr@kernel.org>
---
drivers/base/platform.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 66f9ec73d47e..413c73332308 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -228,6 +228,12 @@ int platform_get_irq_affinity(struct platform_device *dev, unsigned int num,
goto out;
}
+ if (is_acpi_static_node(fwnode)) {
+ ret = fwnode_irq_get(fwnode, num);
+ if (ret > 0 || ret == -EPROBE_DEFER)
+ goto out;
+ }
+
/*
* For the index 0 interrupt, allow falling back to GpioInt
* resources. While a device could have both Interrupt and GpioInt
--
2.54.0