[PATCH 3/3] mtd: nand: atmel: legacy: remove superfluous code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



54bccadddd always populates 'ecc_mode' but forgot to remove the
code which overwrote the previously hardcoded 'NAND_ECC_SOFT'
when needed. This is obsolete now.

Fixes: 54bccadddd ("mtd: atmel_nand: retrieve ecc_mode from pdata")
Signed-off-by: Wolfram Sang <wsa@xxxxxxxxxx>
---
 drivers/mtd/nand/atmel/legacy.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/mtd/nand/atmel/legacy.c b/drivers/mtd/nand/atmel/legacy.c
index 184cf465e3..cf402549b8 100644
--- a/drivers/mtd/nand/atmel/legacy.c
+++ b/drivers/mtd/nand/atmel/legacy.c
@@ -1242,21 +1242,12 @@ static int __init atmel_nand_probe(struct device *dev)
 	nand_chip->ecc.strength = pdata->ecc_strength ? : 1;
 	nand_chip->ecc.size = 1 << (pdata->ecc_size_shift ? : 9);
 
-	if (pdata->ecc_mode == NAND_ECC_HW) {
-		nand_chip->ecc.mode = NAND_ECC_HW;
-	}
-
 	if (pdata->ecc_mode == NAND_ECC_SOFT) {
 		nand_chip->ecc.algo = NAND_ECC_ALGO_HAMMING;
 	}
 
 	nand_chip->legacy.chip_delay = 40;		/* 40us command delay time */
 
-	if (IS_ENABLED(CONFIG_NAND_ECC_BCH) &&
-			pdata->ecc_mode == NAND_ECC_SOFT_BCH) {
-		nand_chip->ecc.mode = NAND_ECC_SOFT_BCH;
-	}
-
 	if (host->board->bus_width_16) {	/* 16-bit bus width */
 		nand_chip->options |= NAND_BUSWIDTH_16;
 		nand_chip->legacy.read_buf = atmel_read_buf16;
-- 
2.35.1





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux