[PATCH 3/7] of: default to internal tree in of_find_node_by_path_from

Sascha Hauer s.hauer at pengutronix.de
Wed Aug 14 04:11:21 EDT 2013


So that of_find_node_by_path_from can be used easier.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/of/base.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index b8cdec5..3ebd672 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1211,6 +1211,9 @@ struct device_node *of_find_node_by_path_from(struct device_node *from,
 {
 	char *slash, *p, *freep;
 
+	if (!from)
+		from = root_node;
+
 	if (!from || !path || *path != '/')
 		return NULL;
 
-- 
1.8.4.rc2




More information about the barebox mailing list