diff options
author | Vimal Singh <vimalsingh@ti.com> | 2009-02-23 03:16:08 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-06-05 12:40:14 -0400 |
commit | 260dc003e9fd41a6cac64308e63dea37ea5de13f (patch) | |
tree | 301bc55d79fd4386776ba3cf753c682e7c69f62d /drivers/mtd/nand/nand_ecc.c | |
parent | 6a4123e581b3112ff4ea7439ab9ae5cb271a9dbd (diff) |
mtd: nand: fix 512 byte software ecc support
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>
Diffstat (limited to 'drivers/mtd/nand/nand_ecc.c')
-rw-r--r-- | drivers/mtd/nand/nand_ecc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c index 868147acce2c..c0cb87d6d16e 100644 --- a/drivers/mtd/nand/nand_ecc.c +++ b/drivers/mtd/nand/nand_ecc.c | |||
@@ -428,8 +428,8 @@ EXPORT_SYMBOL(nand_calculate_ecc); | |||
428 | int nand_correct_data(struct mtd_info *mtd, unsigned char *buf, | 428 | int nand_correct_data(struct mtd_info *mtd, unsigned char *buf, |
429 | unsigned char *read_ecc, unsigned char *calc_ecc) | 429 | unsigned char *read_ecc, unsigned char *calc_ecc) |
430 | { | 430 | { |
431 | unsigned char b0, b1, b2; | 431 | unsigned char b0, b1, b2, bit_addr; |
432 | unsigned char byte_addr, bit_addr; | 432 | unsigned int byte_addr; |
433 | /* 256 or 512 bytes/ecc */ | 433 | /* 256 or 512 bytes/ecc */ |
434 | const uint32_t eccsize_mult = | 434 | const uint32_t eccsize_mult = |
435 | (((struct nand_chip *)mtd->priv)->ecc.size) >> 8; | 435 | (((struct nand_chip *)mtd->priv)->ecc.size) >> 8; |