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

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

 



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@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
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