summaryrefslogtreecommitdiff
path: root/drivers/core/uclass.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/uclass.c
parent6a6d8fbef7eb801a6babad8a62b1318d098ed7ed (diff)
downloadu-boot-89876a55a62f495302e2fd76094e45a65ca188b2.tar.gz
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/uclass.c')
-rw-r--r--drivers/core/uclass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index f6867e4a23..34723ec42a 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -75,7 +75,7 @@ static int uclass_add(enum uclass_id id, struct uclass **ucp)
uc->uc_drv = uc_drv;
INIT_LIST_HEAD(&uc->sibling_node);
INIT_LIST_HEAD(&uc->dev_head);
- list_add(&uc->sibling_node, &gd->uclass_root);
+ list_add(&uc->sibling_node, &DM_UCLASS_ROOT_NON_CONST);
if (uc_drv->init) {
ret = uc_drv->init(uc);