diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-08 03:34:58 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-03-12 17:57:30 +0300 |
commit | c79705ea938e40e204ad90e083a0654f0598a772 (patch) | |
tree | e7c298bc4b55ab913fd63468d6892dd184e3f2b9 /test/dm/test-dm.c | |
parent | 4a467c6de6765a9685d1e3ced95ce141a14dfcf3 (diff) | |
download | u-boot-c79705ea938e40e204ad90e083a0654f0598a772.tar.xz |
test: Move dm_test_init() into test-main.c
Move this function into test-main so that all the init is in one place.
Rename it so that its purpose is clearer.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm/test-dm.c')
-rw-r--r-- | test/dm/test-dm.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/test/dm/test-dm.c b/test/dm/test-dm.c index 15adc53f53..d601e49752 100644 --- a/test/dm/test-dm.c +++ b/test/dm/test-dm.c @@ -12,7 +12,6 @@ #include <malloc.h> #include <asm/global_data.h> #include <asm/state.h> -#include <dm/test.h> #include <dm/root.h> #include <dm/uclass-internal.h> #include <test/test.h> @@ -23,27 +22,6 @@ DECLARE_GLOBAL_DATA_PTR; struct unit_test_state global_dm_test_state; -int dm_test_init(struct unit_test_state *uts) -{ - bool of_live = uts->of_live; - - uts->root = NULL; - uts->testdev = NULL; - uts->force_fail_alloc = false; - uts->skip_post_probe = false; - gd->dm_root = NULL; - if (!CONFIG_IS_ENABLED(OF_PLATDATA)) - memset(dm_testdrv_op_count, '\0', sizeof(dm_testdrv_op_count)); - state_reset_for_test(state_get_current()); - - /* Determine whether to make the live tree available */ - gd_set_of_root(of_live ? uts->of_root : NULL); - ut_assertok(dm_init(of_live)); - uts->root = dm_root(); - - return 0; -} - static int dm_test_destroy(struct unit_test_state *uts) { int id; |