Commit 894824f9 authored by Bastian Hecht's avatar Bastian Hecht Committed by David Woodhouse

mtd: sh_flctl: Only copy OOB data if it is required

Check the new oob_required flag and only copy the OOB data to the internal
buffer if needed.
Signed-off-by: default avatarBastian Hecht <hechtb@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent d76236f3
...@@ -396,6 +396,7 @@ static int flctl_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, ...@@ -396,6 +396,7 @@ static int flctl_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
uint8_t *buf, int oob_required, int page) uint8_t *buf, int oob_required, int page)
{ {
chip->read_buf(mtd, buf, mtd->writesize); chip->read_buf(mtd, buf, mtd->writesize);
if (oob_required)
chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment