提交 7497812d 编写于 作者: S Simon Glass

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: NSimon Glass <sjg@chromium.org>
Acked-by: NMarek Vasut <marex@denx.de>
上级 709ea543
...@@ -47,6 +47,9 @@ int dm_init(void) ...@@ -47,6 +47,9 @@ int dm_init(void)
INIT_LIST_HEAD(&DM_UCLASS_ROOT_NON_CONST); INIT_LIST_HEAD(&DM_UCLASS_ROOT_NON_CONST);
ret = device_bind_by_name(NULL, &root_info, &DM_ROOT_NON_CONST); ret = device_bind_by_name(NULL, &root_info, &DM_ROOT_NON_CONST);
if (ret)
return ret;
ret = device_probe(DM_ROOT_NON_CONST);
if (ret) if (ret)
return ret; return ret;
......
...@@ -106,7 +106,7 @@ static int dm_test_autoprobe(struct dm_test_state *dms) ...@@ -106,7 +106,7 @@ static int dm_test_autoprobe(struct dm_test_state *dms)
ut_asserteq(0, dm_testdrv_op_count[DM_TEST_OP_POST_PROBE]); ut_asserteq(0, dm_testdrv_op_count[DM_TEST_OP_POST_PROBE]);
/* The root device should not be activated until needed */ /* The root device should not be activated until needed */
ut_assert(!(dms->root->flags & DM_FLAG_ACTIVATED)); ut_assert(dms->root->flags & DM_FLAG_ACTIVATED);
/* /*
* We should be able to find the three test devices, and they should * We should be able to find the three test devices, and they should
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册