mtd: at91: atmel_nand: return bit flips for the PMECC read_page()
authorJosh Wu <josh.wu@atmel.com>
Tue, 27 Nov 2012 10:50:31 +0000 (18:50 +0800)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 3 Dec 2012 14:36:53 +0000 (16:36 +0200)
commitc0c70d9ee6569150ff6a10f9d3c50c63c917e3a1
tree6af5ba5479e3ce83da9438679e3a096b6d4c9195
parent070c32223ae8a724a190ea769104ea41567e3673
mtd: at91: atmel_nand: return bit flips for the PMECC read_page()

This patch fix pmecc's read_page() to return maximum number of bitflips, 0 if uncorrectable.

In the commit: 3f91e94f7f511de74c0d2abe08672ccdbdd1961c ("mtd: nand: read_page() returns max_bitflips ()"),
The ecc.read_page() is changed to return the maximum number of bitflips.
And when meet uncorrectable bitflips it needs to return 0.

See the comment in nand.h:
 * @read_page: function to read a page according to the ECC generator
 * requirements; returns maximum number of bitflips corrected in
 * any single ECC step, 0 if bitflips uncorrectable, -EIO hw error

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Reviewed-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/nand/atmel_nand.c