aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/erase.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-28 08:55:42 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:26:09 -0500
commit10934478e44d9a5a7b16dadd89094fb608cf101e (patch)
tree603d4f5165fc032a28e5efaa872da685eea7bf32 /fs/jffs2/erase.c
parentfc002e3c320602d0e206f607aca0460540d7637a (diff)
mtd: do use mtd->point directly
Remove direct usage of the "mtd->point" function pointer. Instead, test the mtd_point() return code for '-EOPNOTSUPP'. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs/jffs2/erase.c')
-rw-r--r--fs/jffs2/erase.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
index c59d642cade2..a01cdad6aad1 100644
--- a/fs/jffs2/erase.c
+++ b/fs/jffs2/erase.c
@@ -336,12 +336,11 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
336 uint32_t ofs; 336 uint32_t ofs;
337 size_t retlen; 337 size_t retlen;
338 int ret = -EIO; 338 int ret = -EIO;
339 unsigned long *wordebuf;
339 340
340 if (c->mtd->point) { 341 ret = mtd_point(c->mtd, jeb->offset, c->sector_size, &retlen,
341 unsigned long *wordebuf; 342 &ebuf, NULL);
342 343 if (ret != -EOPNOTSUPP) {
343 ret = mtd_point(c->mtd, jeb->offset, c->sector_size, &retlen,
344 &ebuf, NULL);
345 if (ret) { 344 if (ret) {
346 D1(printk(KERN_DEBUG "MTD point failed %d\n", ret)); 345 D1(printk(KERN_DEBUG "MTD point failed %d\n", ret));
347 goto do_flash_read; 346 goto do_flash_read;