summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2022-09-06 20:27:24 -0600
committerTom Rini <[email protected]>2022-09-29 22:43:43 -0400
commitb7bd94f1a8a63cd4f947036e0d42ee2e23852d64 (patch)
treecb26f7ac2255dd93940b22859fea9f1b7b34759f /test
parent2187cb7e4aaae7a4ed7318a073b26dff462cb7a1 (diff)
dm: core: Split ofnode_path_root() into two functions
This function turns out to be a little confusing since it looks up a path and also registers the tree. Split it into two, one that gets the root node and one that looks up a path, so the purpose is clear. Registering the tree will happen in a function to be added in a later patch, called oftree_from_fdt(). Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'test')
-rw-r--r--test/boot/vbe_simple.c2
-rw-r--r--test/dm/ofnode.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/test/boot/vbe_simple.c b/test/boot/vbe_simple.c
index 2f6979cafcf..3f03fc3acd2 100644
--- a/test/boot/vbe_simple.c
+++ b/test/boot/vbe_simple.c
@@ -96,7 +96,7 @@ static int vbe_simple_test_base(struct unit_test_state *uts)
fixup.tree.np = np;
ut_assertok(event_notify(EVT_FT_FIXUP, &fixup, sizeof(fixup)));
- node = ofnode_path_root(fixup.tree, "/chosen/fwupd/firmware0");
+ node = oftree_path(fixup.tree, "/chosen/fwupd/firmware0");
version = ofnode_read_string(node, "cur-version");
ut_assertnonnull(version);
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c
index f6bb04642e8..b73ab988287 100644
--- a/test/dm/ofnode.c
+++ b/test/dm/ofnode.c
@@ -532,15 +532,15 @@ static int dm_test_ofnode_root(struct unit_test_state *uts)
ut_assert(oftree_valid(tree));
/* Make sure they don't work on this new tree */
- node = ofnode_path_root(tree, "mmc0");
+ node = oftree_path(tree, "mmc0");
ut_assert(!ofnode_valid(node));
/* It should appear in the new tree */
- node = ofnode_path_root(tree, "/new-mmc");
+ node = oftree_path(tree, "/new-mmc");
ut_assert(ofnode_valid(node));
/* ...and not in the control FDT */
- node = ofnode_path_root(oftree_default(), "/new-mmc");
+ node = oftree_path(oftree_default(), "/new-mmc");
ut_assert(!ofnode_valid(node));
free(root);