[PATCH] nftl: write support is broken

From: dimitri . gorokhovik
Date: Tue Aug 18 2009 - 17:11:15 EST


Write support is broken in NFTL. Fix it.

Signed-off-by: <dimitri.gorokhovik@xxxxxxx>

---

diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
index fb86cac..665d3eb 100644
--- a/drivers/mtd/nftlcore.c
+++ b/drivers/mtd/nftlcore.c
@@ -181,7 +181,7 @@ static int nftl_write(struct mtd_info *mtd, loff_t offs, size_t len,
int res;

ops.mode = MTD_OOB_PLACE;
- ops.ooboffs = offs;
+ ops.ooboffs = offs & (mtd->writesize - 1);
ops.ooblen = mtd->oobsize;
ops.oobbuf = oob;
ops.datbuf = buf;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/