Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

of: property: use new of_graph functions

Current of_graph_get_next_endpoint() can be replaced by using
new of_graph_get_next_port().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87iktib5t0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

authored by

Kuninori Morimoto and committed by
Rob Herring (Arm)
3d4b0149 58fe47d6

+5 -13
+5 -13
drivers/of/property.c
··· 717 717 * parent port node. 718 718 */ 719 719 if (!prev) { 720 - struct device_node *node __free(device_node) = 721 - of_get_child_by_name(parent, "ports"); 722 - 723 - if (node) 724 - parent = node; 725 - 726 - port = of_get_child_by_name(parent, "port"); 720 + port = of_graph_get_next_port(parent, NULL); 727 721 if (!port) { 728 722 pr_debug("graph: no port node found in %pOF\n", parent); 729 723 return NULL; ··· 735 741 * getting the next child. If the previous endpoint is NULL this 736 742 * will return the first child. 737 743 */ 738 - endpoint = of_get_next_child(port, prev); 744 + endpoint = of_graph_get_next_port_endpoint(port, prev); 739 745 if (endpoint) { 740 746 of_node_put(port); 741 747 return endpoint; ··· 744 750 /* No more endpoints under this port, try the next one. */ 745 751 prev = NULL; 746 752 747 - do { 748 - port = of_get_next_child(parent, port); 749 - if (!port) 750 - return NULL; 751 - } while (!of_node_name_eq(port, "port")); 753 + port = of_graph_get_next_port(parent, port); 754 + if (!port) 755 + return NULL; 752 756 } 753 757 } 754 758 EXPORT_SYMBOL(of_graph_get_next_endpoint);