summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2012-05-02 19:15:01 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-05-14 06:21:48 +0200
commita6976cdfe69756436ed8c22b7a03e47a7efe36fb (patch)
tree18c5520d52a0e48796c1f4afd5a4b6c2827f058f /drivers/mtd
parentmtd: eLBC NAND: utilize oob_required parameter (diff)
downloadlinux-a6976cdfe69756436ed8c22b7a03e47a7efe36fb.tar.xz
linux-a6976cdfe69756436ed8c22b7a03e47a7efe36fb.zip
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/fsl_ifc_nand.c3
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 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");