2 Jan 2012 13:20
[PATCH 02/17] mtd: do use mtd->point directly
Artem Bityutskiy <dedekind1 <at> gmail.com>
2012-01-02 12:20:32 GMT
2012-01-02 12:20:32 GMT
From: Artem Bityutskiy <artem.bityutskiy <at> linux.intel.com>
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 <at> linux.intel.com>
---
fs/jffs2/erase.c | 9 ++++-----
fs/jffs2/readinode.c | 18 ++++++++----------
fs/jffs2/scan.c | 2 +-
include/linux/mtd/mtd.h | 2 ++
4 files changed, 15 insertions(+), 16 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
<at> <at> -336,12 +336,11 <at> <at> 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);
(Continue reading)
RSS Feed