irqchip: Fix probing deferal when using IRQCHIP_PLATFORM_DRIVER helpers
authorMarc Zyngier <maz@kernel.org>
Thu, 6 Aug 2020 09:57:45 +0000 (10:57 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 17 Aug 2020 07:06:11 +0000 (08:06 +0100)
When probing an interrupt controller that is behind a parent,
we try to check whether the parent domain is available as
an indication that we can actually try to probe.

Unfortunately, we are checking this with the firmware node of
the about to be probed device, not the parent. This is obviously
bound to fail.

Instead, use the parent node.

Fixes: f8410e626569 ("irqchip: Add IRQCHIP_PLATFORM_DRIVER_BEGIN/END and IRQCHIP_MATCH helper macros")
Reported-by: John Stultz <john.stultz@linaro.org>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
drivers/irqchip/irqchip.c

index 1bb0e36c2bf3dbd5ee07f9fa1588d956deb60177..d2341153e1814d12623c7b14ea62e939031a7e66 100644 (file)
@@ -52,7 +52,7 @@ int platform_irqchip_probe(struct platform_device *pdev)
         * interrupt controller. The actual initialization callback of this
         * interrupt controller can check for specific domains as necessary.
         */
-       if (par_np && !irq_find_matching_host(np, DOMAIN_BUS_ANY))
+       if (par_np && !irq_find_matching_host(par_np, DOMAIN_BUS_ANY))
                return -EPROBE_DEFER;
 
        return irq_init_cb(np, par_np);