Patchwork [MTD,NAND] nand_ecc.c: Bug fix in nand ecc

login
register
mail settings
Submitter Singh, Vimal
Date Feb. 23, 2009, 8:16 a.m.
Message ID <58688.192.168.10.89.1235376968.squirrel@dbdmail.itg.ti.com>
Download mbox | patch
Permalink /patch/23555/
State New, archived
Headers show

Comments

Singh, Vimal - Feb. 23, 2009, 8:16 a.m.
Type of 'byte_addr' needed to change for 512 byte ecc support.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
---

 			(((struct nand_chip *)mtd->priv)->ecc.size) >> 8;

Patch

diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c index
868147a..6b19058 100644
--- a/drivers/mtd/nand/nand_ecc.c
+++ b/drivers/mtd/nand/nand_ecc.c
@@ -429,7 +429,8 @@  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;
+	uint32_t byte_addr;
+	unsigned char bit_addr;
 	/* 256 or 512 bytes/ecc  */
 	const uint32_t eccsize_mult =