jffs2: update to new MTD interface

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Mar 26 20:59:05 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=a6c22850d20273896e7c8ee996730ccf2ba60a22
Commit:     a6c22850d20273896e7c8ee996730ccf2ba60a22
Parent:     c382fb43df3421b6bfb052561d1e8652ee7e82eb
Author:     Brian Norris <computersforpeace at gmail.com>
AuthorDate: Thu Feb 2 16:21:09 2012 -0800
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Tue Mar 27 00:19:38 2012 +0100

    jffs2: update to new MTD interface
    
    There were a few instances of the old MTD interface remaining for JFFS2. We
    fix one error that shows up (only when CONFIG_JFFS2_FS_WRITEBUFFER is not
    defined) like this:
    
      fs/jffs2/read.c: In function 'jffs2_read_dnode':
      fs/jffs2/read.c:36:8: error: 'struct mtd_info' has no member named 'read'
      fs/jffs2/read.c:112:8: error: 'struct mtd_info' has no member named 'read'
      ...
    
    We also simply remove two macros that are not in use, were not updated to
    the new MTD interface, and don't even utilize the old interface properly.
    (That means they weren't used since commit 8593fbc6, year 2006; almost 6
    years ago, for those who don't want to do the math)
    
    Reported-by: Randy Dunlap <rdunlap at xenotime.net>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
    Acked-by: Randy Dunlap <rdunlap at xenotime.net>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 fs/jffs2/os-linux.h |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index ab65ee3..1cd3aec 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -76,7 +76,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
 #define jffs2_write_nand_cleanmarker(c,jeb) (-EIO)
 
 #define jffs2_flash_write(c, ofs, len, retlen, buf) jffs2_flash_direct_write(c, ofs, len, retlen, buf)
-#define jffs2_flash_read(c, ofs, len, retlen, buf) ((c)->mtd->read((c)->mtd, ofs, len, retlen, buf))
+#define jffs2_flash_read(c, ofs, len, retlen, buf) (mtd_read((c)->mtd, ofs, len, retlen, buf))
 #define jffs2_flush_wbuf_pad(c) ({ do{} while(0); (void)(c), 0; })
 #define jffs2_flush_wbuf_gc(c, i) ({ do{} while(0); (void)(c), (void) i, 0; })
 #define jffs2_write_nand_badblock(c,jeb,bad_offset) (1)
@@ -108,8 +108,6 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
 
 #define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH)
 
-#define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf))
-#define jffs2_flash_read_oob(c, ofs, len, retlen, buf) ((c)->mtd->read_oob((c)->mtd, ofs, len, retlen, buf))
 #define jffs2_wbuf_dirty(c) (!!(c)->wbuf_len)
 
 /* wbuf.c */



More information about the linux-mtd-cvs mailing list