summaryrefslogtreecommitdiffstats
path: root/drivers/core/root.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-06-11 23:29:49 -0600
committerSimon Glass <sjg@chromium.org>2014-06-20 11:55:49 -0600
commit89876a55a62f495302e2fd76094e45a65ca188b2 (patch)
tree54dee9f0c349937bf39a2aebc2a7e1d9e6e60842 /drivers/core/root.c
parent6a6d8fbef7eb801a6babad8a62b1318d098ed7ed (diff)
downloadtalos-obmc-uboot-89876a55a62f495302e2fd76094e45a65ca188b2.tar.gz
talos-obmc-uboot-89876a55a62f495302e2fd76094e45a65ca188b2.zip
dm: Cast away the const-ness of the global_data pointer
In a very few cases we need to adjust the driver model root device, such as when setting it up at initialisation. Add a macro to make this easier. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/root.c')
-rw-r--r--drivers/core/root.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/core/root.c b/drivers/core/root.c
index f31be72cd0..1cbb096494 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -43,9 +43,9 @@ int dm_init(void)
dm_warn("Virtual root driver already exists!\n");
return -EINVAL;
}
- INIT_LIST_HEAD(&gd->uclass_root);
+ INIT_LIST_HEAD(&DM_UCLASS_ROOT_NON_CONST);
- ret = device_bind_by_name(NULL, &root_info, &gd->dm_root);
+ ret = device_bind_by_name(NULL, &root_info, &DM_ROOT_NON_CONST);
if (ret)
return ret;
@@ -56,7 +56,7 @@ int dm_scan_platdata(void)
{
int ret;
- ret = lists_bind_drivers(gd->dm_root);
+ ret = lists_bind_drivers(DM_ROOT_NON_CONST);
if (ret == -ENOENT) {
dm_warn("Some drivers were not found\n");
ret = 0;
OpenPOWER on IntegriCloud