[PATCH v4 04/10] mtd: cafe_nand: utilize oob_required parameter
Brian Norris
computersforpeace at gmail.com
Wed May 2 13:14:58 EDT 2012
Don't write OOB if the caller doesn't require it.
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/cafe_nand.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c
index 3a6c88d..aa9a0df 100644
--- a/drivers/mtd/nand/cafe_nand.c
+++ b/drivers/mtd/nand/cafe_nand.c
@@ -527,7 +527,8 @@ static void cafe_nand_write_page_lowlevel(struct mtd_info *mtd,
struct cafe_priv *cafe = mtd->priv;
chip->write_buf(mtd, buf, mtd->writesize);
- chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
+ if (oob_required)
+ chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
/* Set up ECC autogeneration */
cafe->ctl2 |= (1<<30);
--
1.7.5.4.2.g519b1
More information about the linux-mtd
mailing list