diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-30 09:23:41 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:26:19 -0500 |
commit | 1dbebd32562b3c2caeca35960e5cb00bfcc12900 (patch) | |
tree | 773776d87730828adb55f3f7fe8221eabb528d8f /fs | |
parent | e2936b2af5562c8c66060e2bc2ae2e209d0acd3d (diff) |
mtd: harmonize mtd_writev usage
This patch makes the 'mtd_writev()' function more usable and logical. We first
teach it to fall-back to the 'default_mtd_writev()' function if the MTD driver
does not define its own '->writev()' method. Then we make block2mtd and JFFS2
just 'mtd_writev()' instead of 'default_mtd_writev()' function. This means we
can now stop exporting 'default_mtd_writev()' and instead, export
'mtd_writev()'. This is much cleaner and more logical, as well as allows us to
get read of another direct 'mtd->writev' access in JFFS2.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jffs2/writev.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/jffs2/writev.c b/fs/jffs2/writev.c index 8d704073f8b0..a1bda9dab3f8 100644 --- a/fs/jffs2/writev.c +++ b/fs/jffs2/writev.c | |||
@@ -26,11 +26,7 @@ int jffs2_flash_direct_writev(struct jffs2_sb_info *c, const struct kvec *vecs, | |||
26 | } | 26 | } |
27 | } | 27 | } |
28 | 28 | ||
29 | if (c->mtd->writev) | 29 | return mtd_writev(c->mtd, vecs, count, to, retlen); |
30 | return mtd_writev(c->mtd, vecs, count, to, retlen); | ||
31 | else { | ||
32 | return default_mtd_writev(c->mtd, vecs, count, to, retlen); | ||
33 | } | ||
34 | } | 30 | } |
35 | 31 | ||
36 | int jffs2_flash_direct_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, | 32 | int jffs2_flash_direct_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, |