[PATCH 2/3] fixup! sandbox: hostfile: completely switch to OF based probing

Marc Kleine-Budde mkl at pengutronix.de
Thu Mar 5 06:36:40 PST 2015


hostfile: add "barebox" prefix to properties

Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
---
 arch/sandbox/board/hostfile.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/sandbox/board/hostfile.c b/arch/sandbox/board/hostfile.c
index 41ded73a3a21..c1a2643bc7ff 100644
--- a/arch/sandbox/board/hostfile.c
+++ b/arch/sandbox/board/hostfile.c
@@ -85,11 +85,12 @@ static int hf_probe(struct device_d *dev)
 	if (!dev->device_node)
 		return -ENODEV;
 
-	err = of_property_read_u32(dev->device_node, "fd", &priv->fd);
+	err = of_property_read_u32(dev->device_node, "barebox,fd", &priv->fd);
 	if (err)
 		return err;
 
-	err = of_property_read_string(dev->device_node, "filename", &priv->filename);
+	err = of_property_read_string(dev->device_node, "barebox,filename",
+				      &priv->filename);
 	if (err)
 		return err;
 
@@ -132,7 +133,8 @@ static int of_hostfile_fixup(struct device_node *root, void *ctx)
 
 	node = of_new_node(root, hf->devname);
 
-	ret = of_property_write_u32(node, "fd", hf->fd);
+	ret = of_set_property(node, "compatible", hostfile_dt_ids->compatible,
+			      strlen(hostfile_dt_ids->compatible) + 1, 1);
 	if (ret)
 		return ret;
 
@@ -140,12 +142,11 @@ static int of_hostfile_fixup(struct device_node *root, void *ctx)
 	if (ret)
 		return ret;
 
-	ret = of_set_property(node, "compatible", hostfile_dt_ids->compatible,
-			      strlen(hostfile_dt_ids->compatible) + 1, 1);
+	ret = of_property_write_u32(node, "barebox,fd", hf->fd);
 	if (ret)
 		return ret;
 
-	ret = of_set_property(node, "filename", hf->filename,
+	ret = of_set_property(node, "barebox,filename", hf->filename,
 			      strlen(hf->filename) + 1, 1);
 
 	return ret;
-- 
2.1.4




More information about the barebox mailing list