[PATCH 13/17] mtd: Use flags parameter in mtd_add_partition

Sascha Hauer s.hauer at pengutronix.de
Thu Feb 12 00:54:30 PST 2015


mtd_add_partition is passed a flag parameter. This has been unused
so the DEVFS_PARTITION_FIXED and DEVFS_PARTITION_READONLY were ignored.
Fix this.

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

diff --git a/drivers/mtd/partition.c b/drivers/mtd/partition.c
index c514d4b..98b9081 100644
--- a/drivers/mtd/partition.c
+++ b/drivers/mtd/partition.c
@@ -123,6 +123,7 @@ struct mtd_info *mtd_add_partition(struct mtd_info *mtd, off_t offset,
 	part->ecclayout = mtd->ecclayout;
 	part->ecc_strength = mtd->ecc_strength;
 	part->subpage_sft = mtd->subpage_sft;
+	part->cdev.flags = flags;
 
 	if (mtd->numeraseregions > 1) {
 		/* Deal with variable erase size stuff */
-- 
2.1.4




More information about the barebox mailing list