summaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-19 20:40:14 +0300
committerSimon Glass <sjg@chromium.org>2021-01-05 22:24:41 +0300
commitf10643cf8a4ca006d1ad194e930cd292fd869d17 (patch)
tree66cd9383fc5dbd8e02f999d1db5562995f441b21 /drivers/core
parent7d14ee443ca674314e0fe5c3e25f48e52a8fd5ee (diff)
downloadu-boot-f10643cf8a4ca006d1ad194e930cd292fd869d17.tar.xz
dm: core: Access device ofnode through functions
At present ofnode is present in the device even if it is never used. With of-platdata this field is not used, so can be removed. In preparation for this, change the access to go through inline functions. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/device.c2
-rw-r--r--drivers/core/root.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index bd4ecc9e24..6a9bee093d 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -68,7 +68,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
dev_set_plat(dev, plat);
dev->driver_data = driver_data;
dev->name = name;
- dev->node = node;
+ dev_set_ofnode(dev, node);
dev->parent = parent;
dev->driver = drv;
dev->uclass = uc;
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 9ef242979b..fe7359433f 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -148,7 +148,7 @@ int dm_init(bool of_live)
if (ret)
return ret;
if (CONFIG_IS_ENABLED(OF_CONTROL))
- DM_ROOT_NON_CONST->node = ofnode_root();
+ dev_set_ofnode(DM_ROOT_NON_CONST, ofnode_root());
ret = device_probe(DM_ROOT_NON_CONST);
if (ret)
return ret;