Skip to content

Commit

Permalink
mtd: nand: fix 512 byte software ecc support
Browse files Browse the repository at this point in the history
Type of 'byte_addr' needes to be 'unsigned int' for 512 byte
ECC support.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Vimal Singh authored and David Woodhouse committed Jun 5, 2009
1 parent 6a4123e commit 260dc00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/nand/nand_ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ EXPORT_SYMBOL(nand_calculate_ecc);
int nand_correct_data(struct mtd_info *mtd, unsigned char *buf,
unsigned char *read_ecc, unsigned char *calc_ecc)
{
unsigned char b0, b1, b2;
unsigned char byte_addr, bit_addr;
unsigned char b0, b1, b2, bit_addr;
unsigned int byte_addr;
/* 256 or 512 bytes/ecc */
const uint32_t eccsize_mult =
(((struct nand_chip *)mtd->priv)->ecc.size) >> 8;
Expand Down

0 comments on commit 260dc00

Please sign in to comment.