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:
parent
f457f683cb
commit
b29eac0769
|
@ -400,6 +400,9 @@ struct device_node *of_find_node_with_property(struct device_node *from,
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
|
|
||||||
|
if (!from)
|
||||||
|
from = root_node;
|
||||||
|
|
||||||
of_tree_for_each_node_from(np, from) {
|
of_tree_for_each_node_from(np, from) {
|
||||||
struct property *pp = of_find_property(np, prop_name, NULL);
|
struct property *pp = of_find_property(np, prop_name, NULL);
|
||||||
if (pp)
|
if (pp)
|
||||||
|
|
Loading…
Reference in New Issue