mtd: set the ecc step size for master/slave mtd_info
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Aug 30 16:59:04 EDT 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=bdf69c47ac67480122b8842acf0ea75c0d18a5e9
Commit: bdf69c47ac67480122b8842acf0ea75c0d18a5e9
Parent: bf977e3f158dc949fd6e1e4195f80d42232cb5fa
Author: Huang Shijie <b32955 at freescale.com>
AuthorDate: Fri Aug 16 10:10:06 2013 +0800
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Aug 30 21:38:02 2013 +0100
mtd: set the ecc step size for master/slave mtd_info
Set the ecc step size for master/slave mtd_info{}.
Signed-off-by: Huang Shijie <b32955 at freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/mtdpart.c | 1 +
drivers/mtd/nand/nand_base.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 3014933..6e732c3 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -516,6 +516,7 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
}
slave->mtd.ecclayout = 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;
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 761ef2f..49a9780 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3788,6 +3788,7 @@ int nand_scan_tail(struct mtd_info *mtd)
/* propagate ecc info to mtd_info */
mtd->ecclayout = chip->ecc.layout;
mtd->ecc_strength = chip->ecc.strength;
+ mtd->ecc_step_size = chip->ecc.size;
/*
* Initialize bitflip_threshold to its default prior scan_bbt() call.
* scan_bbt() might invoke mtd_read(), thus bitflip_threshold must be
More information about the linux-mtd-cvs
mailing list