[PATCH 06/14] mtd: partition: set cdev->offset to the actual offset

Sascha Hauer s.hauer at pengutronix.de
Thu Mar 30 22:33:15 PDT 2017


cdev->offset is currently not used, but can be useful later when
we separate the of_partition_fixup from mtd, because then we will
need the offset of the partition.

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

diff --git a/drivers/mtd/partition.c b/drivers/mtd/partition.c
index 777cb758ce..745834384f 100644
--- a/drivers/mtd/partition.c
+++ b/drivers/mtd/partition.c
@@ -225,6 +225,8 @@ struct mtd_info *mtd_add_partition(struct mtd_info *mtd, off_t offset,
 	if (ret)
 		goto err;
 
+	part->cdev.offset = offset;
+
 	return part;
 err:
 	free(part->cdev.partname);
-- 
2.11.0




More information about the barebox mailing list