mtd: nand: lpc32xx_mlc: fix ecc.size

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Mar 24 11:59:04 PDT 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=f771749e3a4905e631dafa073543ef429c7cc855
Commit:     f771749e3a4905e631dafa073543ef429c7cc855
Parent:     8be721beb30f14bac915ca1357a0b584d03c0749
Author:     Boris BREZILLON <boris.brezillon at free-electrons.com>
AuthorDate: Mon Dec 7 23:26:03 2015 +0100
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Jan 26 10:27:37 2016 -0800

    mtd: nand: lpc32xx_mlc: fix ecc.size
    
    According to the ECC layout description the actual ecc.size is 512 bytes
    and not mtd->writesize.
    
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/lpc32xx_mlc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/lpc32xx_mlc.c b/drivers/mtd/nand/lpc32xx_mlc.c
index 9bc435d..d8c3e7a 100644
--- a/drivers/mtd/nand/lpc32xx_mlc.c
+++ b/drivers/mtd/nand/lpc32xx_mlc.c
@@ -750,7 +750,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
 	}
 
 	nand_chip->ecc.mode = NAND_ECC_HW;
-	nand_chip->ecc.size = mtd->writesize;
+	nand_chip->ecc.size = 512;
 	nand_chip->ecc.layout = &lpc32xx_nand_oob;
 	host->mlcsubpages = mtd->writesize / 512;
 



More information about the linux-mtd-cvs mailing list