summaryrefslogtreecommitdiff
path: root/test/dm/bus.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-17 07:20:11 +0300
committerSimon Glass <sjg@chromium.org>2020-12-19 06:32:21 +0300
commitba0e7daeefa1ae9821c9fb3103ea7c3ddd2dd2f8 (patch)
tree63baed314a0498dd96ef5d0355f47d90878e7ad2 /test/dm/bus.c
parent1c55b229232c87751fbe3d2b378b496352960816 (diff)
downloadu-boot-ba0e7daeefa1ae9821c9fb3103ea7c3ddd2dd2f8.tar.xz
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 'test/dm/bus.c')
-rw-r--r--test/dm/bus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/dm/bus.c b/test/dm/bus.c
index 9e81b1da1f..77555e5293 100644
--- a/test/dm/bus.c
+++ b/test/dm/bus.c
@@ -159,9 +159,10 @@ static int dm_test_bus_children_funcs(struct unit_test_state *uts)
ut_asserteq(-ENODEV, device_find_child_by_seq(bus, -1, true, &dev));
ut_assertok(device_find_child_by_seq(bus, 0, true, &dev));
ut_assert(!(dev->flags & DM_FLAG_ACTIVATED));
- ut_asserteq(-ENODEV, device_find_child_by_seq(bus, 0, false, &dev));
+ ut_asserteq(0, device_find_child_by_seq(bus, 0, false, &dev));
ut_assertok(device_get_child_by_seq(bus, 0, &dev));
ut_assert(dev->flags & DM_FLAG_ACTIVATED);
+ ut_asserteq(0, device_find_child_by_seq(bus, 0, false, &dev));
/* There is no device with sequence number 2 */
ut_asserteq(-ENODEV, device_find_child_by_seq(bus, 2, false, &dev));