diff options
Diffstat (limited to 'drivers/mtd/sm_ftl.c')
-rw-r--r-- | drivers/mtd/sm_ftl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c index fddb714e323c..072ed5970e2f 100644 --- a/drivers/mtd/sm_ftl.c +++ b/drivers/mtd/sm_ftl.c | |||
@@ -25,7 +25,7 @@ | |||
25 | struct workqueue_struct *cache_flush_workqueue; | 25 | struct workqueue_struct *cache_flush_workqueue; |
26 | 26 | ||
27 | static int cache_timeout = 1000; | 27 | static int cache_timeout = 1000; |
28 | module_param(cache_timeout, bool, S_IRUGO); | 28 | module_param(cache_timeout, int, S_IRUGO); |
29 | MODULE_PARM_DESC(cache_timeout, | 29 | MODULE_PARM_DESC(cache_timeout, |
30 | "Timeout (in ms) for cache flush (1000 ms default"); | 30 | "Timeout (in ms) for cache flush (1000 ms default"); |
31 | 31 | ||
@@ -278,7 +278,7 @@ again: | |||
278 | 278 | ||
279 | /* Unfortunately, oob read will _always_ succeed, | 279 | /* Unfortunately, oob read will _always_ succeed, |
280 | despite card removal..... */ | 280 | despite card removal..... */ |
281 | ret = mtd->read_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops); | 281 | ret = mtd_read_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops); |
282 | 282 | ||
283 | /* Test for unknown errors */ | 283 | /* Test for unknown errors */ |
284 | if (ret != 0 && !mtd_is_bitflip_or_eccerr(ret)) { | 284 | if (ret != 0 && !mtd_is_bitflip_or_eccerr(ret)) { |
@@ -343,7 +343,7 @@ static int sm_write_sector(struct sm_ftl *ftl, | |||
343 | ops.ooblen = SM_OOB_SIZE; | 343 | ops.ooblen = SM_OOB_SIZE; |
344 | ops.oobbuf = (void *)oob; | 344 | ops.oobbuf = (void *)oob; |
345 | 345 | ||
346 | ret = mtd->write_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops); | 346 | ret = mtd_write_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops); |
347 | 347 | ||
348 | /* Now we assume that hardware will catch write bitflip errors */ | 348 | /* Now we assume that hardware will catch write bitflip errors */ |
349 | /* If you are paranoid, use CONFIG_MTD_NAND_VERIFY_WRITE */ | 349 | /* If you are paranoid, use CONFIG_MTD_NAND_VERIFY_WRITE */ |
@@ -479,7 +479,7 @@ static int sm_erase_block(struct sm_ftl *ftl, int zone_num, uint16_t block, | |||
479 | return -EIO; | 479 | return -EIO; |
480 | } | 480 | } |
481 | 481 | ||
482 | if (mtd->erase(mtd, &erase)) { | 482 | if (mtd_erase(mtd, &erase)) { |
483 | sm_printk("erase of block %d in zone %d failed", | 483 | sm_printk("erase of block %d in zone %d failed", |
484 | block, zone_num); | 484 | block, zone_num); |
485 | goto error; | 485 | goto error; |
@@ -645,8 +645,8 @@ int sm_get_media_info(struct sm_ftl *ftl, struct mtd_info *mtd) | |||
645 | if (!ftl->smallpagenand && mtd->oobsize < SM_OOB_SIZE) | 645 | if (!ftl->smallpagenand && mtd->oobsize < SM_OOB_SIZE) |
646 | return -ENODEV; | 646 | return -ENODEV; |
647 | 647 | ||
648 | /* We use these functions for IO */ | 648 | /* We use OOB */ |
649 | if (!mtd->read_oob || !mtd->write_oob) | 649 | if (!mtd_has_oob(mtd)) |
650 | return -ENODEV; | 650 | return -ENODEV; |
651 | 651 | ||
652 | /* Find geometry information */ | 652 | /* Find geometry information */ |