diff options
| author | Simon Glass <[email protected]> | 2020-12-16 21:20:11 -0700 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2020-12-18 20:32:21 -0700 |
| commit | ba0e7daeefa1ae9821c9fb3103ea7c3ddd2dd2f8 (patch) | |
| tree | 63baed314a0498dd96ef5d0355f47d90878e7ad2 /drivers/core | |
| parent | 1c55b229232c87751fbe3d2b378b496352960816 (diff) | |
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 <[email protected]>
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 8d1287f9a19..1e681333d35 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; } |
