diff mbox series

gpio: tegra186: Check PMC driver status before any request

Message ID 20220912133309.18506-1-pshete@nvidia.com
State Superseded
Headers show
Series gpio: tegra186: Check PMC driver status before any request | expand

Commit Message

Prathamesh Shete Sept. 12, 2022, 1:33 p.m. UTC
This patch fixes the issue where even if pmc driver
status is disabled still we are invoking pmc driver
to process some request

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
---
 drivers/gpio/gpio-tegra186.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c
index 54d9fa7da9c1..efd508ba07a6 100644
--- a/drivers/gpio/gpio-tegra186.c
+++ b/drivers/gpio/gpio-tegra186.c
@@ -895,7 +895,7 @@  static int tegra186_gpio_probe(struct platform_device *pdev)
 		tegra186_gpio_init_route_mapping(gpio);
 
 	np = of_find_matching_node(NULL, tegra186_pmc_of_match);
-	if (np) {
+	if (of_device_is_available(np)) {
 		irq->parent_domain = irq_find_host(np);
 		of_node_put(np);