[MTD] Remove readv/readv_ecc
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Wed May 24 05:59:03 EDT 2006
Commit: 2528e8cdf376d7da24647c442ec1e88c360d76ca
Parent: 9d8522df37f91621a70c5c0dbbf5bf2220b16798
Author: Thomas Gleixner <tglx at cruncher.tec.linutronix.de>
AuthorDate: Tue May 23 16:10:00 2006 +0200
Commit: Thomas Gleixner <tglx at cruncher.tec.linutronix.de>
CommitDate: Tue May 23 16:10:00 2006 +0200
[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 at linutronix.de>
drivers/mtd/mtdpart.c | 29 -----------------------------
drivers/mtd/nand/nand_base.c | 1 -
drivers/mtd/onenand/onenand_base.c | 2 --
include/linux/mtd/mtd.h | 6 +-----
4 files changed, 1 insertions(+), 37 deletions(-)
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index ae67560..f418920 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -212,31 +212,6 @@ static int part_writev (struct mtd_info
to + part->offset, retlen);
}
-static int part_readv (struct mtd_info *mtd, struct kvec *vecs,
- unsigned long count, loff_t from, size_t *retlen)
-{
- struct mtd_part *part = PART(mtd);
- if (part->master->readv_ecc == NULL)
- return part->master->readv (part->master, vecs, count,
- from + part->offset, retlen);
- else
- return part->master->readv_ecc (part->master, vecs, count,
- from + part->offset, retlen,
- NULL, &mtd->oobinfo);
-}
-
-static int part_readv_ecc (struct mtd_info *mtd, struct kvec *vecs,
- unsigned long count, loff_t from, size_t *retlen,
- u_char *eccbuf, struct nand_oobinfo *oobsel)
-{
- struct mtd_part *part = PART(mtd);
- if (oobsel == NULL)
- oobsel = &mtd->oobinfo;
- return part->master->readv_ecc (part->master, vecs, count,
- from + part->offset, retlen,
- eccbuf, oobsel);
-}
-
static int part_erase (struct mtd_info *mtd, struct erase_info *instr)
{
struct mtd_part *part = PART(mtd);
@@ -425,10 +400,6 @@ int add_mtd_partitions(struct mtd_info *
}
if (master->writev)
slave->mtd.writev = part_writev;
- if (master->readv)
- slave->mtd.readv = part_readv;
- if (master->readv_ecc)
- slave->mtd.readv_ecc = part_readv_ecc;
if (master->lock)
slave->mtd.lock = part_lock;
if (master->unlock)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 9aaeb3a..da2f4d1 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
mtd->write_ecc = nand_write_ecc;
mtd->read_oob = nand_read_oob;
mtd->write_oob = nand_write_oob;
- mtd->readv = NULL;
mtd->sync = nand_sync;
mtd->lock = NULL;
mtd->unlock = NULL;
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 8e875fa..3a3fe1d 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1824,8 +1824,6 @@ #ifdef CONFIG_MTD_ONENAND_OTP
mtd->write_user_prot_reg = onenand_write_user_prot_reg;
mtd->lock_user_prot_reg = onenand_lock_user_prot_reg;
#endif
- mtd->readv = NULL;
- mtd->readv_ecc = NULL;
mtd->sync = onenand_sync;
mtd->lock = NULL;
mtd->unlock = onenand_unlock;
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index dba25da..af89e52 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -133,14 +133,10 @@ #define MTD_PROGREGION_CTRLMODE_INVALID(
int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len);
- /* kvec-based read/write methods. We need these especially for NAND flash,
- with its limited number of write cycles per erase.
+ /* kvec-based read/write methods.
NB: The 'count' parameter is the number of _vectors_, each of
which contains an (ofs, len) tuple.
*/
- int (*readv) (struct mtd_info *mtd, struct kvec *vecs, unsigned long count, loff_t from, size_t *retlen);
- int (*readv_ecc) (struct mtd_info *mtd, struct kvec *vecs, unsigned long count, loff_t from,
- size_t *retlen, u_char *eccbuf, struct nand_oobinfo *oobsel);
int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen);
/* Sync */
More information about the linux-mtd-cvs
mailing list