mirror of
https://github.com/hardkernel/linux.git
synced 2026-05-30 07:46:36 +09:00
mtd: introduce mtd_writev interface
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
committed by
David Woodhouse
parent
4403dbfb45
commit
b0a31f7b2a
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user