Commit 05d90d89f97e040f2e950478b0015744e8fb0011

Authored by Philip, Avinash
1 parent 9983506323
Exists in master

arm:omap:nand - Remove unaligned size check

This patch removes the check for unaligned size, on reading from NAND
flash. Previously size check was inserted in order to avoid error
correction handling of non-aligned length of page size.

Signed-off-by: Philip, Avinash <avinashphilip@ti.com>

Showing 1 changed file with 6 additions and 9 deletions Side-by-side Diff

drivers/mtd/nand/omap2.c
... ... @@ -857,15 +857,12 @@
857 857 for (i = 0 ; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
858 858 int stat;
859 859  
860   - if (!(chip->ops.len & 0x7ff)) {
861   - stat = chip->ecc.correct(mtd, p, &ecc_code[i],
862   - &ecc_calc[i]);
  860 + stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]);
863 861  
864   - if (stat < 0)
865   - mtd->ecc_stats.failed++;
866   - else
867   - mtd->ecc_stats.corrected += stat;
868   - }
  862 + if (stat < 0)
  863 + mtd->ecc_stats.failed++;
  864 + else
  865 + mtd->ecc_stats.corrected += stat;
869 866 }
870 867 return 0;
871 868 }