aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-23 10:10:00 -0400
committerThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-23 10:10:00 -0400
commit2528e8cdf376d7da24647c442ec1e88c360d76ca (patch)
tree09df5f524085f4d12117fc81791bca10fa8a5f0e
parent9d8522df37f91621a70c5c0dbbf5bf2220b16798 (diff)
[MTD] Remove readv/readv_ecc
These functions were never implemented and added only bloat to partition and concat code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--drivers/mtd/mtdpart.c29
-rw-r--r--drivers/mtd/nand/nand_base.c1
-rw-r--r--drivers/mtd/onenand/onenand_base.c2
-rw-r--r--include/linux/mtd/mtd.h6
4 files changed, 1 insertions, 37 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index ae675608fa91..f418920320d2 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -212,31 +212,6 @@ static int part_writev (struct mtd_info *mtd, const struct kvec *vecs,
212 to + part->offset, retlen); 212 to + part->offset, retlen);
213} 213}
214 214
215static int part_readv (struct mtd_info *mtd, struct kvec *vecs,
216 unsigned long count, loff_t from, size_t *retlen)
217{
218 struct mtd_part *part = PART(mtd);
219 if (part->master->readv_ecc == NULL)
220 return part->master->readv (part->master, vecs, count,
221 from + part->offset, retlen);
222 else
223 return part->master->readv_ecc (part->master, vecs, count,
224 from + part->offset, retlen,
225 NULL, &mtd->oobinfo);
226}
227
228static int part_readv_ecc (struct mtd_info *mtd, struct kvec *vecs,
229 unsigned long count, loff_t from, size_t *retlen,
230 u_char *eccbuf, struct nand_oobinfo *oobsel)
231{
232 struct mtd_part *part = PART(mtd);
233 if (oobsel == NULL)
234 oobsel = &mtd->oobinfo;
235 return part->master->readv_ecc (part->master, vecs, count,
236 from + part->offset, retlen,
237 eccbuf, oobsel);
238}
239
240static int part_erase (struct mtd_info *mtd, struct erase_info *instr) 215static int part_erase (struct mtd_info *mtd, struct erase_info *instr)
241{ 216{
242 struct mtd_part *part = PART(mtd); 217 struct mtd_part *part = PART(mtd);
@@ -425,10 +400,6 @@ int add_mtd_partitions(struct mtd_info *master,
425 } 400 }
426 if (master->writev) 401 if (master->writev)
427 slave->mtd.writev = part_writev; 402 slave->mtd.writev = part_writev;
428 if (master->readv)
429 slave->mtd.readv = part_readv;
430 if (master->readv_ecc)
431 slave->mtd.readv_ecc = part_readv_ecc;
432 if (master->lock) 403 if (master->lock)
433 slave->mtd.lock = part_lock; 404 slave->mtd.lock = part_lock;
434 if (master->unlock) 405 if (master->unlock)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 9aaeb3aa9d4d..da2f4d16e506 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2531,7 +2531,6 @@ int nand_scan(struct mtd_info *mtd, int maxchips)
2531 mtd->write_ecc = nand_write_ecc; 2531 mtd->write_ecc = nand_write_ecc;
2532 mtd->read_oob = nand_read_oob; 2532 mtd->read_oob = nand_read_oob;
2533 mtd->write_oob = nand_write_oob; 2533 mtd->write_oob = nand_write_oob;
2534 mtd->readv = NULL;
2535 mtd->sync = nand_sync; 2534 mtd->sync = nand_sync;
2536 mtd->lock = NULL; 2535 mtd->lock = NULL;
2537 mtd->unlock = NULL; 2536 mtd->unlock = NULL;
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 8e875fa140a8..3a3fe1d8fcdd 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1824,8 +1824,6 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
1824 mtd->write_user_prot_reg = onenand_write_user_prot_reg; 1824 mtd->write_user_prot_reg = onenand_write_user_prot_reg;
1825 mtd->lock_user_prot_reg = onenand_lock_user_prot_reg; 1825 mtd->lock_user_prot_reg = onenand_lock_user_prot_reg;
1826#endif 1826#endif
1827 mtd->readv = NULL;
1828 mtd->readv_ecc = NULL;
1829 mtd->sync = onenand_sync; 1827 mtd->sync = onenand_sync;
1830 mtd->lock = NULL; 1828 mtd->lock = NULL;
1831 mtd->unlock = onenand_unlock; 1829 mtd->unlock = onenand_unlock;
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index dba25da84aed..af89e529b8d2 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -133,14 +133,10 @@ struct mtd_info {
133 int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); 133 int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
134 int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len); 134 int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len);
135 135
136 /* kvec-based read/write methods. We need these especially for NAND flash, 136 /* kvec-based read/write methods.
137 with its limited number of write cycles per erase.
138 NB: The 'count' parameter is the number of _vectors_, each of 137 NB: The 'count' parameter is the number of _vectors_, each of
139 which contains an (ofs, len) tuple. 138 which contains an (ofs, len) tuple.
140 */ 139 */
141 int (*readv) (struct mtd_info *mtd, struct kvec *vecs, unsigned long count, loff_t from, size_t *retlen);
142 int (*readv_ecc) (struct mtd_info *mtd, struct kvec *vecs, unsigned long count, loff_t from,
143 size_t *retlen, u_char *eccbuf, struct nand_oobinfo *oobsel);
144 int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen); 140 int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen);
145 141
146 /* Sync */ 142 /* Sync */