aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdconcat.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-23 10:06:03 -0400
committerThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-23 10:06:03 -0400
commit9d8522df37f91621a70c5c0dbbf5bf2220b16798 (patch)
tree30f51aaccb18b1d4a97b7a5c8a64c63633a2fb7b /drivers/mtd/mtdconcat.c
parent0cddd6c258b2ed3798d12619c28ed0d2b5a669bc (diff)
[MTD] Remove nand writev support
NAND writev(_ecc) support is not longer necessary. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/mtdconcat.c')
-rw-r--r--drivers/mtd/mtdconcat.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index a5e8373349a5..a6fcee2713b0 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -253,9 +253,8 @@ concat_write_ecc(struct mtd_info *mtd, loff_t to, size_t len,
253} 253}
254 254
255static int 255static int
256concat_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs, 256concat_writev(struct mtd_info *mtd, const struct kvec *vecs,
257 unsigned long count, loff_t to, size_t * retlen, 257 unsigned long count, loff_t to, size_t * retlen)
258 u_char *eccbuf, struct nand_oobinfo *oobsel)
259{ 258{
260 struct mtd_concat *concat = CONCAT(mtd); 259 struct mtd_concat *concat = CONCAT(mtd);
261 struct kvec *vecs_copy; 260 struct kvec *vecs_copy;
@@ -315,10 +314,6 @@ concat_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs,
315 314
316 if (!(subdev->flags & MTD_WRITEABLE)) 315 if (!(subdev->flags & MTD_WRITEABLE))
317 err = -EROFS; 316 err = -EROFS;
318 else if (eccbuf)
319 err = subdev->writev_ecc(subdev, &vecs_copy[entry_low],
320 entry_high - entry_low + 1, to, &retsize,
321 eccbuf, oobsel);
322 else 317 else
323 err = subdev->writev(subdev, &vecs_copy[entry_low], 318 err = subdev->writev(subdev, &vecs_copy[entry_low],
324 entry_high - entry_low + 1, to, &retsize); 319 entry_high - entry_low + 1, to, &retsize);
@@ -333,8 +328,6 @@ concat_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs,
333 328
334 *retlen += retsize; 329 *retlen += retsize;
335 total_len -= wsize; 330 total_len -= wsize;
336 if (concat->mtd.type == MTD_NANDFLASH && eccbuf)
337 eccbuf += mtd->oobavail * (wsize / mtd->writesize);
338 331
339 if (total_len == 0) 332 if (total_len == 0)
340 break; 333 break;
@@ -348,13 +341,6 @@ concat_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs,
348} 341}
349 342
350static int 343static int
351concat_writev(struct mtd_info *mtd, const struct kvec *vecs,
352 unsigned long count, loff_t to, size_t * retlen)
353{
354 return concat_writev_ecc(mtd, vecs, count, to, retlen, NULL, NULL);
355}
356
357static int
358concat_read_oob(struct mtd_info *mtd, loff_t from, size_t len, 344concat_read_oob(struct mtd_info *mtd, loff_t from, size_t len,
359 size_t * retlen, u_char * buf) 345 size_t * retlen, u_char * buf)
360{ 346{
@@ -843,8 +829,6 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
843 concat->mtd.write_ecc = concat_write_ecc; 829 concat->mtd.write_ecc = concat_write_ecc;
844 if (subdev[0]->writev) 830 if (subdev[0]->writev)
845 concat->mtd.writev = concat_writev; 831 concat->mtd.writev = concat_writev;
846 if (subdev[0]->writev_ecc)
847 concat->mtd.writev_ecc = concat_writev_ecc;
848 if (subdev[0]->read_oob) 832 if (subdev[0]->read_oob)
849 concat->mtd.read_oob = concat_read_oob; 833 concat->mtd.read_oob = concat_read_oob;
850 if (subdev[0]->write_oob) 834 if (subdev[0]->write_oob)