From 4984de2baaaf82bfc9416e9cdbd3040b97856950 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 17 May 2017 17:18:10 -0600 Subject: 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 --- drivers/core/root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/core/root.c') diff --git a/drivers/core/root.c b/drivers/core/root.c index 4bb71f3cac..570b4d855f 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -167,7 +167,7 @@ int dm_init(void) if (ret) return ret; #if CONFIG_IS_ENABLED(OF_CONTROL) - DM_ROOT_NON_CONST->of_offset = 0; + DM_ROOT_NON_CONST->node = offset_to_ofnode(0); #endif ret = device_probe(DM_ROOT_NON_CONST); if (ret) -- cgit v1.2.3