diff options
Diffstat (limited to 'drivers/mtd/ssfdc.c')
-rw-r--r-- | drivers/mtd/ssfdc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c index 79d3bb659bfe..a5f3d60047d4 100644 --- a/drivers/mtd/ssfdc.c +++ b/drivers/mtd/ssfdc.c | |||
@@ -172,13 +172,12 @@ static int read_raw_oob(struct mtd_info *mtd, loff_t offs, uint8_t *buf) | |||
172 | 172 | ||
173 | ops.mode = MTD_OOB_RAW; | 173 | ops.mode = MTD_OOB_RAW; |
174 | ops.ooboffs = 0; | 174 | ops.ooboffs = 0; |
175 | ops.ooblen = mtd->oobsize; | 175 | ops.ooblen = OOB_SIZE; |
176 | ops.len = OOB_SIZE; | ||
177 | ops.oobbuf = buf; | 176 | ops.oobbuf = buf; |
178 | ops.datbuf = NULL; | 177 | ops.datbuf = NULL; |
179 | 178 | ||
180 | ret = mtd->read_oob(mtd, offs, &ops); | 179 | ret = mtd->read_oob(mtd, offs, &ops); |
181 | if (ret < 0 || ops.retlen != OOB_SIZE) | 180 | if (ret < 0 || ops.oobretlen != OOB_SIZE) |
182 | return -1; | 181 | return -1; |
183 | 182 | ||
184 | return 0; | 183 | return 0; |
@@ -312,7 +311,6 @@ static void ssfdcr_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
312 | 311 | ||
313 | ssfdc->mbd.mtd = mtd; | 312 | ssfdc->mbd.mtd = mtd; |
314 | ssfdc->mbd.devnum = -1; | 313 | ssfdc->mbd.devnum = -1; |
315 | ssfdc->mbd.blksize = SECTOR_SIZE; | ||
316 | ssfdc->mbd.tr = tr; | 314 | ssfdc->mbd.tr = tr; |
317 | ssfdc->mbd.readonly = 1; | 315 | ssfdc->mbd.readonly = 1; |
318 | 316 | ||
@@ -447,6 +445,7 @@ static struct mtd_blktrans_ops ssfdcr_tr = { | |||
447 | .name = "ssfdc", | 445 | .name = "ssfdc", |
448 | .major = SSFDCR_MAJOR, | 446 | .major = SSFDCR_MAJOR, |
449 | .part_bits = SSFDCR_PARTN_BITS, | 447 | .part_bits = SSFDCR_PARTN_BITS, |
448 | .blksize = SECTOR_SIZE, | ||
450 | .getgeo = ssfdcr_getgeo, | 449 | .getgeo = ssfdcr_getgeo, |
451 | .readsect = ssfdcr_readsect, | 450 | .readsect = ssfdcr_readsect, |
452 | .add_mtd = ssfdcr_add_mtd, | 451 | .add_mtd = ssfdcr_add_mtd, |