diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-16 21:20:11 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-18 20:32:21 -0700 |
commit | ba0e7daeefa1ae9821c9fb3103ea7c3ddd2dd2f8 (patch) | |
tree | 63baed314a0498dd96ef5d0355f47d90878e7ad2 /drivers/core | |
parent | 1c55b229232c87751fbe3d2b378b496352960816 (diff) | |
download | u-boot-ba0e7daeefa1ae9821c9fb3103ea7c3ddd2dd2f8.zip u-boot-ba0e7daeefa1ae9821c9fb3103ea7c3ddd2dd2f8.tar.gz u-boot-ba0e7daeefa1ae9821c9fb3103ea7c3ddd2dd2f8.tar.bz2 |
dm: core: Switch binding to use new sequence numbers
Update the core logic to use the new approach. For now the old code is
left as is. Update one test so it still passes.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/device.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c index 8d1287f..1e68133 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -661,12 +661,9 @@ int device_find_child_by_seq(const struct udevice *parent, int seq_or_req_seq, struct udevice *dev; *devp = NULL; - if (seq_or_req_seq == -1) - return -ENODEV; list_for_each_entry(dev, &parent->child_head, sibling_node) { - if ((find_req_seq ? dev->req_seq : dev_seq(dev)) == - seq_or_req_seq) { + if (dev->sqq == seq_or_req_seq) { *devp = dev; return 0; } |