mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 09:12:08 +02:00
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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user