aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2015-10-20 22:16:01 +0200
committerBrian Norris <computersforpeace@gmail.com>2015-11-02 12:54:37 -0800
commit28ec8a864f4b67bb801aede7919391531612c7dd (patch)
tree429945b3feef95bf11f368b65e7ebda241b0b930 /drivers/mtd
parentmtd: nand: sunxi: fix sunxi_nfc_hw_ecc_read/write_chunk() (diff)
downloadlinux-dev-28ec8a864f4b67bb801aede7919391531612c7dd.tar.xz
linux-dev-28ec8a864f4b67bb801aede7919391531612c7dd.zip
mtd: nand: sunxi: avoid retrieving data before ECC pass
The in-band data are copied twice: before ECC correction and after the ECC engine has fixed all the fixable bitflips. Drop the useless memcpy_fromio operation by passing a NULL pointer when calling sunxi_nfc_read_buf(). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/sunxi_nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c
index 96f7370a404f..824711845c44 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -586,7 +586,7 @@ static int sunxi_nfc_hw_ecc_read_chunk(struct mtd_info *mtd,
if (*cur_off != data_off)
nand->cmdfunc(mtd, NAND_CMD_RNDOUT, data_off, -1);
- sunxi_nfc_read_buf(mtd, data, ecc->size);
+ sunxi_nfc_read_buf(mtd, NULL, ecc->size);
if (data_off + ecc->size != oob_off)
nand->cmdfunc(mtd, NAND_CMD_RNDOUT, oob_off, -1);