From: Brian Norris Date: Wed, 2 May 2012 17:15:00 +0000 (-0700) Subject: mtd: eLBC NAND: utilize oob_required parameter X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d112dc7fa65882279434622a40cbe7677a780c46;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git mtd: eLBC 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_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 11e34010272f..784293806110 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -754,7 +754,8 @@ static int fsl_elbc_read_page(struct mtd_info *mtd, struct nand_chip *chip, struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = ctrl->nand; fsl_elbc_read_buf(mtd, buf, mtd->writesize); - fsl_elbc_read_buf(mtd, chip->oob_poi, mtd->oobsize); + if (oob_required) + fsl_elbc_read_buf(mtd, chip->oob_poi, mtd->oobsize); if (fsl_elbc_wait(mtd, chip) & NAND_STATUS_FAIL) mtd->ecc_stats.failed++;