[PATCH] fixup! state: add fixup to copy state from barebox to kernel device tree

Marc Kleine-Budde mkl at pengutronix.de
Tue May 26 04:33:57 PDT 2015


During of_state_fixup() we have to write the #address-cells and #size-cells
property of the node we're copying the data to, not the "root" node of the
device tree we're working on.

Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
---
 common/state.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/state.c b/common/state.c
index cc0e168a7b99..655c9a63e333 100644
--- a/common/state.c
+++ b/common/state.c
@@ -737,11 +737,11 @@ static int of_state_fixup(struct device_node *root, void *ctx)
 		goto out;
 
 	/* address-cells + size-cells */
-	ret = of_property_write_u32(root, "#address-cells", 1);
+	ret = of_property_write_u32(new_node, "#address-cells", 1);
 	if (ret)
 		goto out;
 
-	ret = of_property_write_u32(root, "#size-cells", 1);
+	ret = of_property_write_u32(new_node, "#size-cells", 1);
 	if (ret)
 		goto out;
 
-- 
2.1.4




More information about the barebox mailing list