summaryrefslogtreecommitdiffstats
path: root/drivers/of/base.c
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2013-06-14 01:01:57 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-06-20 21:22:15 +0200
commit097133af15c91f3c214236a15d43ed5f8248edb9 (patch)
treea6a2d37449f21660eec889368c6e42adbc7fc341 /drivers/of/base.c
parente520a8cc463760d21890b35218e4dac817e7c7e7 (diff)
downloadbarebox-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.c15
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