From 501a9a7ed803ac948adb392e541f9da9bafad60e Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Wed, 30 Mar 2022 12:26:40 -0400 Subject: dm: core: Use device_foreach_child where possible We have some nice macros for iterating over devices in device.h, but they are not used by the driver core. Convert all the users I could find. Signed-off-by: Sean Anderson --- drivers/core/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/core/dump.c') diff --git a/drivers/core/dump.c b/drivers/core/dump.c index f2f9cacc56c..fe97dca954d 100644 --- a/drivers/core/dump.c +++ b/drivers/core/dump.c @@ -39,7 +39,7 @@ static void show_devices(struct udevice *dev, int depth, int last_flag) printf("%s\n", dev->name); - list_for_each_entry(child, &dev->child_head, sibling_node) { + device_foreach_child(child, dev) { is_last = list_is_last(&child->sibling_node, &dev->child_head); show_devices(child, depth + 1, (last_flag << 1) | is_last); } -- cgit v1.2.3