[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250104210524.2137-3-gordoste@iinet.net.au>
Date: Sun, 5 Jan 2025 08:05:24 +1100
From: Stephen Gordon <gordoste@...et.net.au>
To: robh@...nel.org,
saravanak@...gle.com
Cc: devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Stephen Gordon <gordoste@...et.net.au>
Subject: [PATCH 2/2] of_graph: Convert of_graph_get_next_xx to return nodes in address order
Use the new of_get_next_child_by_id() function to ensure nodes are
returned in address order.
Signed-off-by: Stephen Gordon <gordoste@...et.net.au>
---
drivers/of/property.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 519bf9229e61..0f9bdd4b4c45 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -658,7 +658,7 @@ struct device_node *of_graph_get_next_port(const struct device_node *parent,
}
do {
- prev = of_get_next_child(parent, prev);
+ prev = of_get_next_child_by_id(parent, prev);
if (!prev)
break;
} while (!of_node_name_eq(prev, "port"));
@@ -680,7 +680,7 @@ struct device_node *of_graph_get_next_port_endpoint(const struct device_node *po
struct device_node *prev)
{
while (1) {
- prev = of_get_next_child(port, prev);
+ prev = of_get_next_child_by_id(port, prev);
if (!prev)
break;
if (WARN(!of_node_name_eq(prev, "endpoint"),
--
2.39.5
Powered by blists - more mailing lists