Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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)
{
	chip->read_buf(mtd, buf, mtd->writesize);
	if (oob_required)
		chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
	return 0;
}