aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/dwc/pci-keystone.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/dwc/pci-keystone.c')
-rw-r--r--drivers/pci/dwc/pci-keystone.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/dwc/pci-keystone.c b/drivers/pci/dwc/pci-keystone.c
index 5bee3af47588..d4f8ab90c018 100644
--- a/drivers/pci/dwc/pci-keystone.c
+++ b/drivers/pci/dwc/pci-keystone.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * PCIe host controller driver for Texas Instruments Keystone SoCs 3 * PCIe host controller driver for Texas Instruments Keystone SoCs
3 * 4 *
@@ -6,10 +7,6 @@
6 * 7 *
7 * Author: Murali Karicheri <m-karicheri2@ti.com> 8 * Author: Murali Karicheri <m-karicheri2@ti.com>
8 * Implementation based on pci-exynos.c and pcie-designware.c 9 * Implementation based on pci-exynos.c and pcie-designware.c
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */ 10 */
14 11
15#include <linux/irqchip/chained_irq.h> 12#include <linux/irqchip/chained_irq.h>
@@ -178,7 +175,7 @@ static int ks_pcie_get_irq_controller_info(struct keystone_pcie *ks_pcie,
178 } 175 }
179 176
180 /* interrupt controller is in a child node */ 177 /* interrupt controller is in a child node */
181 *np_temp = of_find_node_by_name(np_pcie, controller); 178 *np_temp = of_get_child_by_name(np_pcie, controller);
182 if (!(*np_temp)) { 179 if (!(*np_temp)) {
183 dev_err(dev, "Node for %s is absent\n", controller); 180 dev_err(dev, "Node for %s is absent\n", controller);
184 return -EINVAL; 181 return -EINVAL;
@@ -187,6 +184,7 @@ static int ks_pcie_get_irq_controller_info(struct keystone_pcie *ks_pcie,
187 temp = of_irq_count(*np_temp); 184 temp = of_irq_count(*np_temp);
188 if (!temp) { 185 if (!temp) {
189 dev_err(dev, "No IRQ entries in %s\n", controller); 186 dev_err(dev, "No IRQ entries in %s\n", controller);
187 of_node_put(*np_temp);
190 return -EINVAL; 188 return -EINVAL;
191 } 189 }
192 190
@@ -204,6 +202,8 @@ static int ks_pcie_get_irq_controller_info(struct keystone_pcie *ks_pcie,
204 break; 202 break;
205 } 203 }
206 204
205 of_node_put(*np_temp);
206
207 if (temp) { 207 if (temp) {
208 *num_irqs = temp; 208 *num_irqs = temp;
209 return 0; 209 return 0;