[PATCH v3 04/10] mtd: cafe_nand: utilize oob_required parameter
Brian Norris
computersforpeace at gmail.com
Fri Apr 27 21:29:48 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 738aafa..4c9714b 100644
--- a/drivers/mtd/nand/cafe_nand.c
+++ b/drivers/mtd/nand/cafe_nand.c
@@ -525,7 +525,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