aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nftlcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nftlcore.c')
-rw-r--r--drivers/mtd/nftlcore.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
index d974adab3492..f4d38546068f 100644
--- a/drivers/mtd/nftlcore.c
+++ b/drivers/mtd/nftlcore.c
@@ -147,10 +147,9 @@ int nftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len,
147 ops.ooblen = len; 147 ops.ooblen = len;
148 ops.oobbuf = buf; 148 ops.oobbuf = buf;
149 ops.datbuf = NULL; 149 ops.datbuf = NULL;
150 ops.len = len;
151 150
152 res = mtd->read_oob(mtd, offs & ~(mtd->writesize - 1), &ops); 151 res = mtd->read_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
153 *retlen = ops.retlen; 152 *retlen = ops.oobretlen;
154 return res; 153 return res;
155} 154}
156 155
@@ -168,10 +167,9 @@ int nftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len,
168 ops.ooblen = len; 167 ops.ooblen = len;
169 ops.oobbuf = buf; 168 ops.oobbuf = buf;
170 ops.datbuf = NULL; 169 ops.datbuf = NULL;
171 ops.len = len;
172 170
173 res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops); 171 res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
174 *retlen = ops.retlen; 172 *retlen = ops.oobretlen;
175 return res; 173 return res;
176} 174}
177 175