[MTD] Remove the only useless readv implementation
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu May 25 08:59:07 EDT 2006
Commit: 8546ac4f84b252fff078fab1a992c70504147914
Parent: f5bbdacc41939f89d8ccb18dd79cd9b21c0cb75d
Author: Thomas Gleixner <tglx at cruncher.tec.linutronix.de>
AuthorDate: Thu May 25 13:38:45 2006 +0200
Commit: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Thu May 25 12:53:47 2006 +0100
[MTD] Remove the only useless readv implementation
Removing readv from struct mtd_info broke block2mtd. Remove the
reference and the useless default implementation.
Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
drivers/mtd/devices/block2mtd.c | 1 -
drivers/mtd/mtdcore.c | 32 --------------------------------
2 files changed, 0 insertions(+), 33 deletions(-)
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index 8ca04f4..0d98c22 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -331,7 +331,6 @@ static struct block2mtd_dev *add_device(
dev->mtd.writev = default_mtd_writev;
dev->mtd.sync = block2mtd_sync;
dev->mtd.read = block2mtd_read;
- dev->mtd.readv = default_mtd_readv;
dev->mtd.priv = dev;
dev->mtd.owner = THIS_MODULE;
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 9905870..49bc9fd 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -254,37 +254,6 @@ int default_mtd_writev(struct mtd_info *
return ret;
}
-
-/* default_mtd_readv - default mtd readv method for MTD devices that dont
- * implement their own
- */
-
-int default_mtd_readv(struct mtd_info *mtd, struct kvec *vecs,
- unsigned long count, loff_t from, size_t *retlen)
-{
- unsigned long i;
- size_t totlen = 0, thislen;
- int ret = 0;
-
- if(!mtd->read) {
- ret = -EIO;
- } else {
- for (i=0; i<count; i++) {
- if (!vecs[i].iov_len)
- continue;
- ret = mtd->read(mtd, from, vecs[i].iov_len, &thislen, vecs[i].iov_base);
- totlen += thislen;
- if (ret || thislen != vecs[i].iov_len)
- break;
- from += vecs[i].iov_len;
- }
- }
- if (retlen)
- *retlen = totlen;
- return ret;
-}
-
-
EXPORT_SYMBOL(add_mtd_device);
EXPORT_SYMBOL(del_mtd_device);
EXPORT_SYMBOL(get_mtd_device);
@@ -292,7 +261,6 @@ EXPORT_SYMBOL(put_mtd_device);
EXPORT_SYMBOL(register_mtd_user);
EXPORT_SYMBOL(unregister_mtd_user);
EXPORT_SYMBOL(default_mtd_writev);
-EXPORT_SYMBOL(default_mtd_readv);
#ifdef CONFIG_PROC_FS
More information about the linux-mtd-cvs
mailing list