Message ID | 20230606071717.8088-1-pshete@nvidia.com |
---|---|
State | Accepted |
Commit | 5cc9525bfc8e32029d1339349d65873c42193b00 |
Headers | show |
Series | gpio: tegra186: Check PMC driver status before any request | expand |
On Tue, Jun 6, 2023 at 9:17 AM Prathamesh Shete <pshete@nvidia.com> wrote: > This patch fixes the issue where even if PMC driver status is > disabled still we are trying to look up for the IRQ domain > that PMC driver would've registered if it had been enabled. > > Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com> > Signed-off-by: Prathamesh Shete <pshete@nvidia.com> Patch applied! Yours, Linus Walleij
diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c index 464b0ea3b6f1..80d08ddde40e 100644 --- a/drivers/gpio/gpio-tegra186.c +++ b/drivers/gpio/gpio-tegra186.c @@ -964,11 +964,15 @@ static int tegra186_gpio_probe(struct platform_device *pdev) np = of_find_matching_node(NULL, tegra186_pmc_of_match); if (np) { - irq->parent_domain = irq_find_host(np); - of_node_put(np); - - if (!irq->parent_domain) - return -EPROBE_DEFER; + if (of_device_is_available(np)) { + irq->parent_domain = irq_find_host(np); + of_node_put(np); + + if (!irq->parent_domain) + return -EPROBE_DEFER; + } else { + of_node_put(np); + } } irq->map = devm_kcalloc(&pdev->dev, gpio->gpio.ngpio,