mtd: use mtd_set_ecclayout() where appropriate
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon May 23 21:59:13 PDT 2016
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=f6a6da179308356cac0f1dde979b67094437ef16
Commit: f6a6da179308356cac0f1dde979b67094437ef16
Parent: 036d6543f85319ffe96afad6de73d3a220917a63
Author: Boris Brezillon <boris.brezillon at free-electrons.com>
AuthorDate: Wed Feb 3 20:13:26 2016 +0100
Committer: Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Tue Apr 19 22:05:53 2016 +0200
mtd: use mtd_set_ecclayout() where appropriate
Use the mtd_set_ecclayout() helper instead of directly assigning the
mtd->ecclayout field.
Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
drivers/mtd/mtdconcat.c | 2 +-
drivers/mtd/mtdpart.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 239a8c8..481565e 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -777,7 +777,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
}
- concat->mtd.ecclayout = subdev[0]->ecclayout;
+ mtd_set_ecclayout(&concat->mtd, subdev[0]->ecclayout);
concat->num_subdev = num_devs;
concat->mtd.name = name;
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 08de4b2..f53d9d7 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -533,7 +533,7 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
part->name);
}
- slave->mtd.ecclayout = master->ecclayout;
+ mtd_set_ecclayout(&slave->mtd, master->ecclayout);
slave->mtd.ecc_step_size = master->ecc_step_size;
slave->mtd.ecc_strength = master->ecc_strength;
slave->mtd.bitflip_threshold = master->bitflip_threshold;
More information about the linux-mtd-cvs
mailing list