summaryrefslogtreecommitdiff
path: root/drivers/core/device-remove.c
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2022-03-30 12:26:40 -0400
committerSimon Glass <sjg@chromium.org>2022-06-28 03:09:51 +0100
commit501a9a7ed803ac948adb392e541f9da9bafad60e (patch)
treeba8d53d511cc84bebb3aa93ade42d8af350237cd /drivers/core/device-remove.c
parent8b52f237f0f8ae63c930fa8459c39ab87367bad1 (diff)
downloadu-boot-501a9a7ed803ac948adb392e541f9da9bafad60e.tar.gz
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 <seanga2@gmail.com>
Diffstat (limited to 'drivers/core/device-remove.c')
-rw-r--r--drivers/core/device-remove.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c
index 73d2e9e420..a86b9325dd 100644
--- a/drivers/core/device-remove.c
+++ b/drivers/core/device-remove.c
@@ -29,7 +29,7 @@ int device_chld_unbind(struct udevice *dev, struct driver *drv)
assert(dev);
- list_for_each_entry_safe(pos, n, &dev->child_head, sibling_node) {
+ device_foreach_child_safe(pos, n, dev) {
if (drv && (pos->driver != drv))
continue;
@@ -52,7 +52,7 @@ int device_chld_remove(struct udevice *dev, struct driver *drv,
assert(dev);
- list_for_each_entry_safe(pos, n, &dev->child_head, sibling_node) {
+ device_foreach_child_safe(pos, n, dev) {
int ret;
if (drv && (pos->driver != drv))