diff options
author | Neelesh Gupta <neelegup@linux.vnet.ibm.com> | 2015-02-04 12:29:25 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-02-11 18:49:29 +1100 |
commit | de8bd4d09310f8307ffd1cee7d0f10b11c44fb60 (patch) | |
tree | 180ea7137211ca2b5a9c31c57190d89e6f0b9773 /include | |
parent | cbf0e24e6734ceb52bbefdb02fb9f35f180dad11 (diff) | |
download | skiboot-de8bd4d09310f8307ffd1cee7d0f10b11c44fb60.zip skiboot-de8bd4d09310f8307ffd1cee7d0f10b11c44fb60.tar.gz skiboot-de8bd4d09310f8307ffd1cee7d0f10b11c44fb60.tar.bz2 |
core/device: Function to return child node using name
Add a function dt_find_by_name() that returns the child node if
matches the given name, otherwise NULL.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/device.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/device.h b/include/device.h index 16c26bb..b301958 100644 --- a/include/device.h +++ b/include/device.h @@ -167,6 +167,9 @@ char *dt_get_path(const struct dt_node *node); /* Find a node by path */ struct dt_node *dt_find_by_path(struct dt_node *root, const char *path); +/* Find a child node by name */ +struct dt_node *dt_find_by_name(struct dt_node *root, const char *name); + /* Find a node by phandle */ struct dt_node *dt_find_by_phandle(struct dt_node *root, u32 phandle); |