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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So that of_find_node_by_path_from can be used easier.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux