From: Brian Norris Date: Wed, 2 May 2012 17:15:01 +0000 (-0700) Subject: mtd: IFC NAND: utilize oob_required parameter X-Git-Tag: v3.5-rc1~8^2~23 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a6976cdfe69756436ed8c22b7a03e47a7efe36fb;p=karo-tx-linux.git mtd: IFC NAND: utilize oob_required parameter Don't read OOB if the caller doesn't require it. Signed-off-by: Brian Norris Reviewed-by: Scott Wood Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index c085df3d816a..9602c1b7e27e 100644 --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c @@ -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");