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

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

 



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


_______________________________________________
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