Commit 7497812d47d4ad17172ec373469a33a6ab8b257e

Authored by Simon Glass
1 parent 709ea543b9

dm: Make sure that the root device is probed

The root device should be probed just like any other device. The effect of
this is to mark the device as activated, so that it can be removed (along
with its children) if required.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>

Showing 2 changed files with 4 additions and 1 deletions Side-by-side Diff

... ... @@ -49,6 +49,9 @@
49 49 ret = device_bind_by_name(NULL, &root_info, &DM_ROOT_NON_CONST);
50 50 if (ret)
51 51 return ret;
  52 + ret = device_probe(DM_ROOT_NON_CONST);
  53 + if (ret)
  54 + return ret;
52 55  
53 56 return 0;
54 57 }
... ... @@ -106,7 +106,7 @@
106 106 ut_asserteq(0, dm_testdrv_op_count[DM_TEST_OP_POST_PROBE]);
107 107  
108 108 /* The root device should not be activated until needed */
109   - ut_assert(!(dms->root->flags & DM_FLAG_ACTIVATED));
  109 + ut_assert(dms->root->flags & DM_FLAG_ACTIVATED);
110 110  
111 111 /*
112 112 * We should be able to find the three test devices, and they should