[PATCH v4 07/10] mtd: IFC NAND: utilize oob_required parameter

Brian Norris computersforpeace at gmail.com
Wed May 2 13:15:01 EDT 2012


Don't read OOB if the caller doesn't require it.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
Reviewed-by: Scott Wood <scottwood at freescale.com>
---
 drivers/mtd/nand/fsl_ifc_nand.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
index c085df3..9602c1b 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");
-- 
1.7.5.4.2.g519b1




More information about the linux-mtd mailing list