Skip to content

Commit

Permalink
mtd: atmel_nand: fix pmecc selction for ecc requirement typo
Browse files Browse the repository at this point in the history
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 <scottwood@freescale.com>
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Josh Wu authored and David Woodhouse committed Aug 5, 2013
1 parent 68e8078 commit edc9cba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/mtd/nand/atmel_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit edc9cba

Please sign in to comment.