[PATCH 3/3] of_path: Allow to specify path with phandle only

Sascha Hauer s.hauer at pengutronix.de
Mon Apr 28 02:31:45 PDT 2014


Instead of just allowing to specify an OF path with additional
partname: property allow to specify a phandle to the partition
directly.

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

diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c
index 20eb771..6a2d634 100644
--- a/drivers/of/of_path.c
+++ b/drivers/of/of_path.c
@@ -148,6 +148,9 @@ int of_find_path(struct device_node *node, const char *propname, char **outpath)
 
 	device_detect(op.dev);
 
+	if (list_is_singular(&op.dev->cdevs))
+		op.cdev = list_first_entry(&op.dev->cdevs, struct cdev, devices_list);
+
 	i = 1;
 
 	while (1) {
-- 
1.9.1




More information about the barebox mailing list