aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-19 10:40:17 -0700
committerSimon Glass <sjg@chromium.org>2021-01-05 12:24:41 -0700
commit8a715530bb1f9522030757379415b174f3109951 (patch)
tree91422fb39012c35377fe8a50c772fb79634aba07 /test
parent49bbe6eab5babbc353f1dc76e6275671c69dffb2 (diff)
downloadu-boot-8a715530bb1f9522030757379415b174f3109951.zip
u-boot-8a715530bb1f9522030757379415b174f3109951.tar.gz
u-boot-8a715530bb1f9522030757379415b174f3109951.tar.bz2
dm: core: Allow the uclass list to move
At present the uclass list head is in global_data. This is convenient but with the new of-platdata we need the list head to be declared by the generated code. Change this over to be a pointer. Provide a 'static' version in global_data to retain the current behaviour. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/dm/core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/dm/core.c b/test/dm/core.c
index 565896e..580d171 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -116,14 +116,14 @@ static int dm_test_autobind(struct unit_test_state *uts)
* device with no children.
*/
ut_assert(dms->root);
- ut_asserteq(1, list_count_items(&gd->uclass_root));
+ ut_asserteq(1, list_count_items(gd->uclass_root));
ut_asserteq(0, list_count_items(&gd->dm_root->child_head));
ut_asserteq(0, dm_testdrv_op_count[DM_TEST_OP_POST_BIND]);
ut_assertok(dm_scan_plat(false));
/* We should have our test class now at least, plus more children */
- ut_assert(1 < list_count_items(&gd->uclass_root));
+ ut_assert(1 < list_count_items(gd->uclass_root));
ut_assert(0 < list_count_items(&gd->dm_root->child_head));
/* Our 3 dm_test_infox children should be bound to the test uclass */
@@ -1073,7 +1073,7 @@ static int dm_test_all_have_seq(struct unit_test_state *uts)
struct udevice *dev;
struct uclass *uc;
- list_for_each_entry(uc, &gd->uclass_root, sibling_node) {
+ list_for_each_entry(uc, gd->uclass_root, sibling_node) {
list_for_each_entry(dev, &uc->dev_head, uclass_node) {
if (dev->seq_ == -1)
printf("Device '%s' has no seq (%d)\n",