diff mbox series

[2/9] of: address: Add argument 'name' for of_node_is_pcie()

Message ID 20240919-pcie_ep_range-v1-2-b3e9d62780b7@nxp.com (mailing list archive)
State Superseded
Headers show
Series PCI-EP: Add 'ranges' support for PCI endpoint devices | expand

Commit Message

Frank Li Sept. 19, 2024, 10:03 p.m. UTC
Add argument 'name' for help function of_node_is_pcie(). Prepare for adding
pci-ep support.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/of/address.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/of/address.c b/drivers/of/address.c
index 286f0c161e332..d886f16df8a6e 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -147,9 +147,9 @@  static unsigned int of_bus_pci_get_flags(const __be32 *addr)
  * PCI bus specific translator
  */
 
-static bool of_node_is_pcie(struct device_node *np)
+static bool of_node_is_pcie(struct device_node *np, const char *name)
 {
-	bool is_pcie = of_node_name_eq(np, "pcie");
+	bool is_pcie = of_node_name_eq(np, name);
 
 	if (is_pcie)
 		pr_warn_once("%pOF: Missing device_type\n", np);
@@ -169,7 +169,7 @@  static int of_bus_pci_match(struct device_node *np)
 	 */
 	return of_node_is_type(np, "pci") || of_node_is_type(np, "pciex") ||
 		of_node_is_type(np, "vci") || of_node_is_type(np, "ht") ||
-		of_node_is_pcie(np);
+		of_node_is_pcie(np, "pcie");
 }
 
 static void of_bus_pci_count_cells(struct device_node *np,