From df87e6b1b815ae3484ea2aa7c53b90af382eae1b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 2 Oct 2016 17:59:29 -0600 Subject: libfdt: Sync fdt_for_each_subnode() with upstream The signature for this macro has changed. Bring in the upstream version and adjust U-Boot's usages to suit. Signed-off-by: Simon Glass Update to drivers/power/pmic/palmas.c: Signed-off-by: Keerthy Change-Id: I6cc9021339bfe686f9df21d61a1095ca2b3776e8 --- lib/fdtdec.c | 2 +- lib/libfdt/fdt_overlay.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/fdtdec.c b/lib/fdtdec.c index adc9975c36..4e619c49a2 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -836,7 +836,7 @@ int fdtdec_get_child_count(const void *blob, int node) int subnode; int num = 0; - fdt_for_each_subnode(blob, subnode, node) + fdt_for_each_subnode(subnode, blob, node) num++; return num; diff --git a/lib/libfdt/fdt_overlay.c b/lib/libfdt/fdt_overlay.c index 40b6d27455..d35ceacbf0 100644 --- a/lib/libfdt/fdt_overlay.c +++ b/lib/libfdt/fdt_overlay.c @@ -146,7 +146,7 @@ static int overlay_adjust_node_phandles(void *fdto, int node, if (!found && !ret) return ret; - fdt_for_each_subnode(fdto, child, node) + fdt_for_each_subnode(child, fdto, node) overlay_adjust_node_phandles(fdto, child, delta); return 0; @@ -248,7 +248,7 @@ static int overlay_update_local_node_references(void *fdto, } } - fdt_for_each_subnode(fdto, fixup_child, fixup_node) { + fdt_for_each_subnode(fixup_child, fdto, fixup_node) { const char *fixup_child_name = fdt_get_name(fdto, fixup_child, NULL); int tree_child; @@ -511,7 +511,7 @@ static int overlay_apply_node(void *fdt, int target, return ret; } - fdt_for_each_subnode(fdto, node, fragment) { + fdt_for_each_subnode(node, fdto, fragment) { const char *name = fdt_get_name(fdto, node, NULL); int nnode; int ret; @@ -550,7 +550,7 @@ static int overlay_merge(void *dt, void *dto) { int fragment; - fdt_for_each_subnode(dto, fragment, 0) { + fdt_for_each_subnode(fragment, dto, 0) { int overlay; int target; int ret; -- cgit v1.2.1