diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-19 10:40:17 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-01-05 12:24:41 -0700 |
commit | 8a715530bb1f9522030757379415b174f3109951 (patch) | |
tree | 91422fb39012c35377fe8a50c772fb79634aba07 /drivers/core/device.c | |
parent | 49bbe6eab5babbc353f1dc76e6275671c69dffb2 (diff) | |
download | u-boot-8a715530bb1f9522030757379415b174f3109951.zip u-boot-8a715530bb1f9522030757379415b174f3109951.tar.gz u-boot-8a715530bb1f9522030757379415b174f3109951.tar.bz2 |
dm: core: Allow the uclass list to move
At present the uclass list head is in global_data. This is convenient
but with the new of-platdata we need the list head to be declared by
the generated code.
Change this over to be a pointer. Provide a 'static' version in
global_data to retain the current behaviour.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/device.c')
-rw-r--r-- | drivers/core/device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c index 6a9bee0..aeab383 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -613,7 +613,7 @@ static int device_find_by_ofnode(ofnode node, struct udevice **devp) struct udevice *dev; int ret; - list_for_each_entry(uc, &gd->uclass_root, sibling_node) { + list_for_each_entry(uc, gd->uclass_root, sibling_node) { ret = uclass_find_device_by_ofnode(uc->uc_drv->id, node, &dev); if (!ret || dev) { @@ -1032,7 +1032,7 @@ int dev_disable_by_path(const char *path) if (!of_live_active()) return -ENOSYS; - list_for_each_entry(uc, &gd->uclass_root, sibling_node) { + list_for_each_entry(uc, gd->uclass_root, sibling_node) { ret = uclass_find_device_by_ofnode(uc->uc_drv->id, node, &dev); if (!ret) break; |