From 79b8546507fc91bcb3f809c82e7f74aaf0dc7f65 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sun, 20 Oct 2019 21:58:39 -0500 Subject: [PATCH] allwinner: a64: power: Use fdt_for_each_subnode This simplifies the code a bit. Verified to produce the same binary. Signed-off-by: Samuel Holland Change-Id: Ie1ec1ce2ea39c46525840906826c90a8a7eff287 --- plat/allwinner/sun50i_a64/sunxi_power.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plat/allwinner/sun50i_a64/sunxi_power.c b/plat/allwinner/sun50i_a64/sunxi_power.c index 6e84bf7db..fb3783a8b 100644 --- a/plat/allwinner/sun50i_a64/sunxi_power.c +++ b/plat/allwinner/sun50i_a64/sunxi_power.c @@ -246,9 +246,7 @@ static void setup_axp803_rails(const void *fdt) } /* iterate over all regulators to find used ones */ - for (node = fdt_first_subnode(fdt, node); - node >= 0; - node = fdt_next_subnode(fdt, node)) { + fdt_for_each_subnode(node, fdt, node) { const struct axp_regulator *reg; const char *name; int length; -- GitLab