Loading drivers/mtd/mtdconcat.c +3 −2 Original line number Diff line number Diff line Loading @@ -227,8 +227,9 @@ concat_writev(struct mtd_info *mtd, const struct kvec *vecs, if (!(subdev->flags & MTD_WRITEABLE)) err = -EROFS; else err = subdev->writev(subdev, &vecs_copy[entry_low], entry_high - entry_low + 1, to, &retsize); err = mtd_writev(subdev, &vecs_copy[entry_low], entry_high - entry_low + 1, to, &retsize); vecs_copy[entry_high].iov_len = old_iov_len - size; vecs_copy[entry_high].iov_base += size; Loading drivers/mtd/mtdpart.c +2 −2 Original line number Diff line number Diff line Loading @@ -238,8 +238,8 @@ static int part_writev(struct mtd_info *mtd, const struct kvec *vecs, struct mtd_part *part = PART(mtd); if (!(mtd->flags & MTD_WRITEABLE)) return -EROFS; return part->master->writev(part->master, vecs, count, to + part->offset, retlen); return mtd_writev(part->master, vecs, count, to + part->offset, retlen); } static int part_erase(struct mtd_info *mtd, struct erase_info *instr) Loading fs/jffs2/writev.c +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ int jffs2_flash_direct_writev(struct jffs2_sb_info *c, const struct kvec *vecs, } if (c->mtd->writev) return c->mtd->writev(c->mtd, vecs, count, to, retlen); return mtd_writev(c->mtd, vecs, count, to, retlen); else { return mtd_fake_writev(c->mtd, vecs, count, to, retlen); } Loading include/linux/mtd/mtd.h +12 −6 Original line number Diff line number Diff line Loading @@ -204,18 +204,14 @@ struct mtd_info { size_t *retlen, u_char *buf); int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len); int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen); /* Backing device capabilities for this device * - provides mmap capabilities */ struct backing_dev_info *backing_dev_info; /* kvec-based read/write methods. NB: The 'count' parameter is the number of _vectors_, each of which contains an (ofs, len) tuple. */ int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen); /* Sync */ void (*sync) (struct mtd_info *mtd); Loading Loading @@ -375,6 +371,16 @@ static inline int mtd_lock_user_prot_reg(struct mtd_info *mtd, loff_t from, return mtd->lock_user_prot_reg(mtd, from, len); } /* * kvec-based read/write method. NB: The 'count' parameter is the number of * _vectors_, each of which contains an (ofs, len) tuple. */ static inline int mtd_writev(struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen) { return mtd->writev(mtd, vecs, count, to, retlen); } static inline struct mtd_info *dev_to_mtd(struct device *dev) { return dev ? dev_get_drvdata(dev) : NULL; Loading Loading
drivers/mtd/mtdconcat.c +3 −2 Original line number Diff line number Diff line Loading @@ -227,8 +227,9 @@ concat_writev(struct mtd_info *mtd, const struct kvec *vecs, if (!(subdev->flags & MTD_WRITEABLE)) err = -EROFS; else err = subdev->writev(subdev, &vecs_copy[entry_low], entry_high - entry_low + 1, to, &retsize); err = mtd_writev(subdev, &vecs_copy[entry_low], entry_high - entry_low + 1, to, &retsize); vecs_copy[entry_high].iov_len = old_iov_len - size; vecs_copy[entry_high].iov_base += size; Loading
drivers/mtd/mtdpart.c +2 −2 Original line number Diff line number Diff line Loading @@ -238,8 +238,8 @@ static int part_writev(struct mtd_info *mtd, const struct kvec *vecs, struct mtd_part *part = PART(mtd); if (!(mtd->flags & MTD_WRITEABLE)) return -EROFS; return part->master->writev(part->master, vecs, count, to + part->offset, retlen); return mtd_writev(part->master, vecs, count, to + part->offset, retlen); } static int part_erase(struct mtd_info *mtd, struct erase_info *instr) Loading
fs/jffs2/writev.c +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ int jffs2_flash_direct_writev(struct jffs2_sb_info *c, const struct kvec *vecs, } if (c->mtd->writev) return c->mtd->writev(c->mtd, vecs, count, to, retlen); return mtd_writev(c->mtd, vecs, count, to, retlen); else { return mtd_fake_writev(c->mtd, vecs, count, to, retlen); } Loading
include/linux/mtd/mtd.h +12 −6 Original line number Diff line number Diff line Loading @@ -204,18 +204,14 @@ struct mtd_info { size_t *retlen, u_char *buf); int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len); int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen); /* Backing device capabilities for this device * - provides mmap capabilities */ struct backing_dev_info *backing_dev_info; /* kvec-based read/write methods. NB: The 'count' parameter is the number of _vectors_, each of which contains an (ofs, len) tuple. */ int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen); /* Sync */ void (*sync) (struct mtd_info *mtd); Loading Loading @@ -375,6 +371,16 @@ static inline int mtd_lock_user_prot_reg(struct mtd_info *mtd, loff_t from, return mtd->lock_user_prot_reg(mtd, from, len); } /* * kvec-based read/write method. NB: The 'count' parameter is the number of * _vectors_, each of which contains an (ofs, len) tuple. */ static inline int mtd_writev(struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen) { return mtd->writev(mtd, vecs, count, to, retlen); } static inline struct mtd_info *dev_to_mtd(struct device *dev) { return dev ? dev_get_drvdata(dev) : NULL; Loading