From 371e88e2366215b5a033c2cedaf7486d1e66914d Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Thu, 12 Jan 2017 14:54:08 +1100 Subject: dt: add dt_new_check() This is similar to dt_new(), but if the node already exists it will return the existing node. This is useful because some init code depends on the presence of certain nodes, but where the node is actually created is unimportant. Signed-off-by: Oliver O'Halloran Reviewed-by: Vasant Hegde Reviewed-by: Vasant Hegde Signed-off-by: Stewart Smith --- include/device.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/device.h') diff --git a/include/device.h b/include/device.h index 4198a41c..1ad403f1 100644 --- a/include/device.h +++ b/include/device.h @@ -67,6 +67,7 @@ struct dt_node *dt_new_addr(struct dt_node *parent, const char *name, uint64_t unit_addr); struct dt_node *dt_new_2addr(struct dt_node *parent, const char *name, uint64_t unit_addr0, uint64_t unit_addr1); +struct dt_node *dt_new_check(struct dt_node *parent, const char *name); /* Copy node to new parent, including properties and subnodes */ struct dt_node *dt_copy(struct dt_node *node, struct dt_node *parent); -- cgit v1.2.1