xen/arm: pass node to device_tree_for_each_node
authorStefano Stabellini <sstabellini@kernel.org>
Mon, 19 Aug 2019 17:43:31 +0000 (10:43 -0700)
committerJulien Grall <julien.grall@arm.com>
Tue, 20 Aug 2019 12:39:36 +0000 (13:39 +0100)
commit40f2ea3df2e2980750ffa99bed3d877993c47254
treeab58323ee88f91c65697d0cc210318c2597afc7b
parent4470efeae44fc1fe9ae4004408e175f8271fcda3
xen/arm: pass node to device_tree_for_each_node

Add a new parameter to device_tree_for_each_node: node, the node to
start the search from.

To avoid scanning device tree, and given that we only care about
relative increments of depth compared to the depth of the initial node,
we set the initial depth to 0. Then, we call func() for every node with
depth > 0.

Don't call func() on the parent node passed as an argument. Clarify the
change in the comment on top of the function. The current callers pass
the root node as argument: it is OK to skip the root node because no
relevant properties are in it, only subnodes.

Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
[julien: Remove min_depth variable]
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/acpi/boot.c
xen/arch/arm/bootfdt.c
xen/include/xen/device_tree.h