diff options
| author | Mark Brown <[email protected]> | 2012-07-22 18:32:00 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2012-07-22 18:32:00 +0000 |
| commit | 3384fb98845dc014770caa224d61a2effd258ca5 (patch) | |
| tree | 8189134a4938632e2d06e93af04c9fc1f3c2d4c9 /drivers/mtd/nand/nand_base.c | |
| parent | Merge branches 'regulator-core', 'regulator-dt' and 'regulator-dummy' into re... (diff) | |
| parent | regulator: add new lp8788 regulator driver (diff) | |
| download | kernel-3384fb98845dc014770caa224d61a2effd258ca5.tar.gz kernel-3384fb98845dc014770caa224d61a2effd258ca5.zip | |
Merge branch 'regulator-drivers' into regulator-next
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
| -rw-r--r-- | drivers/mtd/nand/nand_base.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index d47586cf64ce..a11253a0fcab 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -3501,6 +3501,13 @@ 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; + /* + * Initialize bitflip_threshold to its default prior scan_bbt() call. + * scan_bbt() might invoke mtd_read(), thus bitflip_threshold must be + * properly set. + */ + if (!mtd->bitflip_threshold) + mtd->bitflip_threshold = mtd->ecc_strength; /* Check, if we should skip the bad block table scan */ if (chip->options & NAND_SKIP_BBTSCAN) |
