From: Josh Wu Date: Wed, 3 Jul 2013 09:56:19 +0000 (+0800) Subject: mtd: atmel_nand: fix pmecc selction for ecc requirement typo X-Git-Tag: MMI-PSA29.97-13-9~13677^2~98 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=edc9cba495680a8a4968ed204b5c9f61a991bf4f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mtd: atmel_nand: fix pmecc selction for ecc requirement typo Atmel PMECC support 2, 4, 8, 12, 24 bit error correction. So if the ecc requirement in ONFI is <= 2, 4, 8, 12, 24. We will use 2, 4, 8, 12, 24. This patch fix the typo. Use '<=' replace '<'. Reported-by: Scott Wood Signed-off-by: Josh Wu Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 73228e0c4e49..a43adce34ae5 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -959,11 +959,11 @@ static int pmecc_choose_ecc(struct atmel_nand_host *host, host->pmecc_corr_cap = 2; else if (*cap <= 4) host->pmecc_corr_cap = 4; - else if (*cap < 8) + else if (*cap <= 8) host->pmecc_corr_cap = 8; - else if (*cap < 12) + else if (*cap <= 12) host->pmecc_corr_cap = 12; - else if (*cap < 24) + else if (*cap <= 24) host->pmecc_corr_cap = 24; else return -EINVAL;