diff options
author | Brian Norris <computersforpeace@gmail.com> | 2014-05-28 04:45:56 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-07-01 21:55:02 -0400 |
commit | adddcac0a2683b93c106c6297c7c7e66498bcdde (patch) | |
tree | f5501a88553b526fe61062a447920700893efb51 | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) |
mtd: lpc32xx: drop bitflip_threshold initialization
These drivers don't need to explicitly initialize their bitflip
thresholds. The comment is no longer correct, since nand_scan_tail()
performs this initialization as of the following commit:
commit ea3b2ea24ef0f2ef9c6795b19cff456195b6728a
Author: Shmulik Ladkani <shmulik@jungo.com>
Date: Fri Jun 8 18:29:06 2012 +0300
mtd: nand: initialize bitflip_threshold prior to BBT scanning
(It seems there were some parallel efforts on writing/submitting these
drivers, and Shmulik's bug fix.)
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Roland Stigge <stigge@antcom.de>
-rw-r--r-- | drivers/mtd/nand/lpc32xx_mlc.c | 6 | ||||
-rw-r--r-- | drivers/mtd/nand/lpc32xx_slc.c | 6 |
2 files changed, 0 insertions, 12 deletions
diff --git a/drivers/mtd/nand/lpc32xx_mlc.c b/drivers/mtd/nand/lpc32xx_mlc.c index 687478c9f09c..7335346dc126 100644 --- a/drivers/mtd/nand/lpc32xx_mlc.c +++ b/drivers/mtd/nand/lpc32xx_mlc.c | |||
@@ -721,12 +721,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) | |||
721 | nand_chip->bbt_td = &lpc32xx_nand_bbt; | 721 | nand_chip->bbt_td = &lpc32xx_nand_bbt; |
722 | nand_chip->bbt_md = &lpc32xx_nand_bbt_mirror; | 722 | nand_chip->bbt_md = &lpc32xx_nand_bbt_mirror; |
723 | 723 | ||
724 | /* bitflip_threshold's default is defined as ecc_strength anyway. | ||
725 | * Unfortunately, it is set only later at add_mtd_device(). Meanwhile | ||
726 | * being 0, it causes bad block table scanning errors in | ||
727 | * nand_scan_tail(), so preparing it here. */ | ||
728 | mtd->bitflip_threshold = nand_chip->ecc.strength; | ||
729 | |||
730 | if (use_dma) { | 724 | if (use_dma) { |
731 | res = lpc32xx_dma_setup(host); | 725 | res = lpc32xx_dma_setup(host); |
732 | if (res) { | 726 | if (res) { |
diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c index 53a6742e3da3..8caef28e0756 100644 --- a/drivers/mtd/nand/lpc32xx_slc.c +++ b/drivers/mtd/nand/lpc32xx_slc.c | |||
@@ -840,12 +840,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) | |||
840 | chip->ecc.strength = 1; | 840 | chip->ecc.strength = 1; |
841 | chip->ecc.hwctl = lpc32xx_nand_ecc_enable; | 841 | chip->ecc.hwctl = lpc32xx_nand_ecc_enable; |
842 | 842 | ||
843 | /* bitflip_threshold's default is defined as ecc_strength anyway. | ||
844 | * Unfortunately, it is set only later at add_mtd_device(). Meanwhile | ||
845 | * being 0, it causes bad block table scanning errors in | ||
846 | * nand_scan_tail(), so preparing it here already. */ | ||
847 | mtd->bitflip_threshold = chip->ecc.strength; | ||
848 | |||
849 | /* | 843 | /* |
850 | * Allocate a large enough buffer for a single huge page plus | 844 | * Allocate a large enough buffer for a single huge page plus |
851 | * extra space for the spare area and ECC storage area | 845 | * extra space for the spare area and ECC storage area |