summaryrefslogtreecommitdiff
path: root/drivers/core/device.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-17 23:18:10 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-01 13:03:04 (GMT)
commit4984de2baaaf82bfc9416e9cdbd3040b97856950 (patch)
treea3922476dddd7da5aae226a8eb5c16fc405bcca1 /drivers/core/device.c
parentda409ccc4ae62a0bf7111e2f4419fdbfd1ba3d89 (diff)
downloadu-boot-4984de2baaaf82bfc9416e9cdbd3040b97856950.tar.xz
dm: core: Add ofnode to represent device tree nodes
With live tree we need a struct device_node * to reference a node. With the existing flat tree, we need an int offset. We need to unify these into a single value which can represent both. Add an ofnode union for this and adjust existing code to move to this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/device.c')
-rw-r--r--drivers/core/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 483f836..2738685 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -60,7 +60,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
dev->platdata = platdata;
dev->driver_data = driver_data;
dev->name = name;
- dev->of_offset = of_offset;
+ dev->node = offset_to_ofnode(of_offset);
dev->parent = parent;
dev->driver = drv;
dev->uclass = uc;