diff options
author | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2013-06-14 01:01:57 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-06-20 21:22:15 +0200 |
commit | 097133af15c91f3c214236a15d43ed5f8248edb9 (patch) | |
tree | a6a2d37449f21660eec889368c6e42adbc7fc341 /drivers/of/base.c | |
parent | e520a8cc463760d21890b35218e4dac817e7c7e7 (diff) | |
download | barebox-097133af15c91f3c214236a15d43ed5f8248edb9.tar.gz barebox-097133af15c91f3c214236a15d43ed5f8248edb9.tar.xz |
OF: base: remove of_find_child_by_name
With of_get_child_by_name from Linux API, we can now convert and remove
of_find_child_by_name.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Diffstat (limited to 'drivers/of/base.c')
-rw-r--r-- | drivers/of/base.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index f381e49dff..1b351ee203 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1270,7 +1270,7 @@ struct device_node *of_find_node_by_path_from(struct device_node *from, if (slash) *slash = 0; - from = of_find_child_by_name(from, p); + from = of_get_child_by_name(from, p); if (!from) goto out; @@ -1905,17 +1905,6 @@ int of_probe(void) return 0; } -struct device_node *of_find_child_by_name(struct device_node *node, const char *name) -{ - struct device_node *_n; - - device_node_for_nach_child(node, _n) - if (!of_node_cmp(_n->name, name)) - return _n; - - return NULL; -} - /** * of_create_node - create a new node including its parents * @path - the nodepath to create @@ -1940,7 +1929,7 @@ struct device_node *of_create_node(struct device_node *root, const char *path) if (slash) *slash = 0; - tmp = of_find_child_by_name(dn, p); + tmp = of_get_child_by_name(dn, p); if (tmp) dn = tmp; else |