mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 07:01:32 +00:00
mtd: IFC NAND: utilize oob_required parameter
Don't read OOB if the caller doesn't require it. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Reviewed-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
d112dc7fa6
commit
a6976cdfe6
@ -706,7 +706,8 @@ static int fsl_ifc_read_page(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
struct fsl_ifc_nand_ctrl *nctrl = ifc_nand_ctrl;
|
||||
|
||||
fsl_ifc_read_buf(mtd, buf, mtd->writesize);
|
||||
fsl_ifc_read_buf(mtd, chip->oob_poi, mtd->oobsize);
|
||||
if (oob_required)
|
||||
fsl_ifc_read_buf(mtd, chip->oob_poi, mtd->oobsize);
|
||||
|
||||
if (ctrl->nand_stat & IFC_NAND_EVTER_STAT_ECCER)
|
||||
dev_err(priv->dev, "NAND Flash ECC Uncorrectable Error\n");
|
||||
|
Loading…
Reference in New Issue
Block a user