]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
mtd: set the ecc step size for master/slave mtd_info
authorHuang Shijie <b32955@freescale.com>
Fri, 16 Aug 2013 02:10:06 +0000 (10:10 +0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 30 Aug 2013 20:38:02 +0000 (21:38 +0100)
Set the ecc step size for master/slave mtd_info{}.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/mtdpart.c
drivers/mtd/nand/nand_base.c

index 301493382cd0a27a0df3fe0b5285fdb6a8cbb5f0..6e732c3820c14bf9d07b693a0c1de9bfff0088f0 100644 (file)
@@ -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;
 
index 761ef2fa423e5e91e9176b57bdd649a7dee97635..49a9780a0055a4b4a69279577b2950e351f5c5b5 100644 (file)
@@ -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