[PATCH] mtd: partition: Fix OF partition fixup

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

 



To get the number of address cells and size cells we have to use
the newly created partition node, not the parent device node. The
parent device node returns the address/size cells of the controller
node, not the partition node.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/mtd/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index 63b1e4a..431114b 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -520,8 +520,8 @@ static int of_mtd_fixup(struct device_node *root, void *ctx)
 		if (!p)
 			return -ENOMEM;
 
-		na = of_n_addr_cells(np);
-		ns = of_n_size_cells(np);
+		na = of_n_addr_cells(part);
+		ns = of_n_size_cells(part);
 
 		of_write_number(tmp + len, partmtd->master_offset, na);
 		len += na * 4;
-- 
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