9
0
Fork 0

OF: base: initalize from node in of_find_node_with_property

This adds initialization of from device node with root_node if NULL
is passed. This corresponds to the behavior of all other node iterators.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sebastian Hesselbarth 2013-07-05 23:19:43 +02:00 committed by Sascha Hauer
parent f457f683cb
commit b29eac0769
1 changed files with 3 additions and 0 deletions

View File

@ -400,6 +400,9 @@ struct device_node *of_find_node_with_property(struct device_node *from,
{
struct device_node *np;
if (!from)
from = root_node;
of_tree_for_each_node_from(np, from) {
struct property *pp = of_find_property(np, prop_name, NULL);
if (pp)