diff options
Diffstat (limited to 'drivers/mtd/mtdpart.c')
-rw-r--r-- | drivers/mtd/mtdpart.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index 082662f90481..ae675608fa91 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c | |||
@@ -208,13 +208,8 @@ static int part_writev (struct mtd_info *mtd, const struct kvec *vecs, | |||
208 | struct mtd_part *part = PART(mtd); | 208 | struct mtd_part *part = PART(mtd); |
209 | if (!(mtd->flags & MTD_WRITEABLE)) | 209 | if (!(mtd->flags & MTD_WRITEABLE)) |
210 | return -EROFS; | 210 | return -EROFS; |
211 | if (part->master->writev_ecc == NULL) | 211 | return part->master->writev (part->master, vecs, count, |
212 | return part->master->writev (part->master, vecs, count, | ||
213 | to + part->offset, retlen); | 212 | to + part->offset, retlen); |
214 | else | ||
215 | return part->master->writev_ecc (part->master, vecs, count, | ||
216 | to + part->offset, retlen, | ||
217 | NULL, &mtd->oobinfo); | ||
218 | } | 213 | } |
219 | 214 | ||
220 | static int part_readv (struct mtd_info *mtd, struct kvec *vecs, | 215 | static int part_readv (struct mtd_info *mtd, struct kvec *vecs, |
@@ -230,20 +225,6 @@ static int part_readv (struct mtd_info *mtd, struct kvec *vecs, | |||
230 | NULL, &mtd->oobinfo); | 225 | NULL, &mtd->oobinfo); |
231 | } | 226 | } |
232 | 227 | ||
233 | static int part_writev_ecc (struct mtd_info *mtd, const struct kvec *vecs, | ||
234 | unsigned long count, loff_t to, size_t *retlen, | ||
235 | u_char *eccbuf, struct nand_oobinfo *oobsel) | ||
236 | { | ||
237 | struct mtd_part *part = PART(mtd); | ||
238 | if (!(mtd->flags & MTD_WRITEABLE)) | ||
239 | return -EROFS; | ||
240 | if (oobsel == NULL) | ||
241 | oobsel = &mtd->oobinfo; | ||
242 | return part->master->writev_ecc (part->master, vecs, count, | ||
243 | to + part->offset, retlen, | ||
244 | eccbuf, oobsel); | ||
245 | } | ||
246 | |||
247 | static int part_readv_ecc (struct mtd_info *mtd, struct kvec *vecs, | 228 | static int part_readv_ecc (struct mtd_info *mtd, struct kvec *vecs, |
248 | unsigned long count, loff_t from, size_t *retlen, | 229 | unsigned long count, loff_t from, size_t *retlen, |
249 | u_char *eccbuf, struct nand_oobinfo *oobsel) | 230 | u_char *eccbuf, struct nand_oobinfo *oobsel) |
@@ -446,8 +427,6 @@ int add_mtd_partitions(struct mtd_info *master, | |||
446 | slave->mtd.writev = part_writev; | 427 | slave->mtd.writev = part_writev; |
447 | if (master->readv) | 428 | if (master->readv) |
448 | slave->mtd.readv = part_readv; | 429 | slave->mtd.readv = part_readv; |
449 | if (master->writev_ecc) | ||
450 | slave->mtd.writev_ecc = part_writev_ecc; | ||
451 | if (master->readv_ecc) | 430 | if (master->readv_ecc) |
452 | slave->mtd.readv_ecc = part_readv_ecc; | 431 | slave->mtd.readv_ecc = part_readv_ecc; |
453 | if (master->lock) | 432 | if (master->lock) |