diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2017-01-12 14:54:08 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-01-15 12:42:54 +1100 |
commit | 371e88e2366215b5a033c2cedaf7486d1e66914d (patch) | |
tree | 22fe9460285649c2e590b0292369c19e0cb9392e /include/device.h | |
parent | 821675b3d44f6995cb78ff9bc10ed91d1c9ea8af (diff) | |
download | blackbird-skiboot-371e88e2366215b5a033c2cedaf7486d1e66914d.tar.gz blackbird-skiboot-371e88e2366215b5a033c2cedaf7486d1e66914d.zip |
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 <oohall@gmail.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/device.h')
-rw-r--r-- | include/device.h | 1 |
1 files changed, 1 insertions, 0 deletions
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); |