[PATCH 2/2] of_graph: Convert of_graph_get_next_xx to return nodes in address order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the new of_get_next_child_by_id() function to ensure nodes are
returned in address order.

Signed-off-by: Stephen Gordon <gordoste@xxxxxxxxxxxx>
---
 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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux