Skip to content

Commit

Permalink
mtd: eLBC NAND: utilize oob_required parameter
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Brian Norris authored and David Woodhouse committed May 14, 2012
1 parent e47f3db commit d112dc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mtd/nand/fsl_elbc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit d112dc7

Please sign in to comment.