dm: core: Provide a way to reset the device tree
At present there is only one device tree used by the ofnode functions,
except for some esoteric use of live tree. In preparation for supporting
more than one, add a way to reset the list of device trees.
For now this does nothing.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/test-main.c b/test/test-main.c
index 1fcbae3..d74df29 100644
--- a/test/test-main.c
+++ b/test/test-main.c
@@ -11,6 +11,7 @@
#include <event.h>
#include <of_live.h>
#include <os.h>
+#include <dm/ofnode.h>
#include <dm/root.h>
#include <dm/test.h>
#include <dm/uclass-internal.h>
@@ -99,6 +100,7 @@
/* Determine whether to make the live tree available */
gd_set_of_root(of_live ? uts->of_root : NULL);
+ oftree_reset();
ut_assertok(dm_init(of_live));
uts->root = dm_root();