summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/erase.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-28 15:55:42 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 18:26:09 +0000
commit10934478e44d9a5a7b16dadd89094fb608cf101e (patch)
tree603d4f5165fc032a28e5efaa872da685eea7bf32 /fs/jffs2/erase.c
parentfc002e3c320602d0e206f607aca0460540d7637a (diff)
downloadop-kernel-dev-10934478e44d9a5a7b16dadd89094fb608cf101e.zip
op-kernel-dev-10934478e44d9a5a7b16dadd89094fb608cf101e.tar.gz
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 c59d642..a01cdad 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
uint32_t ofs;
size_t retlen;
int ret = -EIO;
+ unsigned long *wordebuf;
- if (c->mtd->point) {
- unsigned long *wordebuf;
-
- ret = mtd_point(c->mtd, jeb->offset, c->sector_size, &retlen,
- &ebuf, NULL);
+ ret = mtd_point(c->mtd, jeb->offset, c->sector_size, &retlen,
+ &ebuf, NULL);
+ if (ret != -EOPNOTSUPP) {
if (ret) {
D1(printk(KERN_DEBUG "MTD point failed %d\n", ret));
goto do_flash_read;
OpenPOWER on IntegriCloud