aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-25 07:38:45 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-25 07:53:47 -0400
commit8546ac4f84b252fff078fab1a992c70504147914 (patch)
tree98fd824f18bb045b0a8191ad2735fc1978ea6f91 /drivers
parentf5bbdacc41939f89d8ccb18dd79cd9b21c0cb75d (diff)
[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@linutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/devices/block2mtd.c1
-rw-r--r--drivers/mtd/mtdcore.c32
2 files changed, 0 insertions, 33 deletions
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index 8ca04f4e03f0..0d98c223c5fc 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -331,7 +331,6 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
331 dev->mtd.writev = default_mtd_writev; 331 dev->mtd.writev = default_mtd_writev;
332 dev->mtd.sync = block2mtd_sync; 332 dev->mtd.sync = block2mtd_sync;
333 dev->mtd.read = block2mtd_read; 333 dev->mtd.read = block2mtd_read;
334 dev->mtd.readv = default_mtd_readv;
335 dev->mtd.priv = dev; 334 dev->mtd.priv = dev;
336 dev->mtd.owner = THIS_MODULE; 335 dev->mtd.owner = THIS_MODULE;
337 336
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 9905870f56e5..49bc9fdcb88b 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -254,37 +254,6 @@ int default_mtd_writev(struct mtd_info *mtd, const struct kvec *vecs,
254 return ret; 254 return ret;
255} 255}
256 256
257
258/* default_mtd_readv - default mtd readv method for MTD devices that dont
259 * implement their own
260 */
261
262int default_mtd_readv(struct mtd_info *mtd, struct kvec *vecs,
263 unsigned long count, loff_t from, size_t *retlen)
264{
265 unsigned long i;
266 size_t totlen = 0, thislen;
267 int ret = 0;
268
269 if(!mtd->read) {
270 ret = -EIO;
271 } else {
272 for (i=0; i<count; i++) {
273 if (!vecs[i].iov_len)
274 continue;
275 ret = mtd->read(mtd, from, vecs[i].iov_len, &thislen, vecs[i].iov_base);
276 totlen += thislen;
277 if (ret || thislen != vecs[i].iov_len)
278 break;
279 from += vecs[i].iov_len;
280 }
281 }
282 if (retlen)
283 *retlen = totlen;
284 return ret;
285}
286
287
288EXPORT_SYMBOL(add_mtd_device); 257EXPORT_SYMBOL(add_mtd_device);
289EXPORT_SYMBOL(del_mtd_device); 258EXPORT_SYMBOL(del_mtd_device);
290EXPORT_SYMBOL(get_mtd_device); 259EXPORT_SYMBOL(get_mtd_device);
@@ -292,7 +261,6 @@ EXPORT_SYMBOL(put_mtd_device);
292EXPORT_SYMBOL(register_mtd_user); 261EXPORT_SYMBOL(register_mtd_user);
293EXPORT_SYMBOL(unregister_mtd_user); 262EXPORT_SYMBOL(unregister_mtd_user);
294EXPORT_SYMBOL(default_mtd_writev); 263EXPORT_SYMBOL(default_mtd_writev);
295EXPORT_SYMBOL(default_mtd_readv);
296 264
297#ifdef CONFIG_PROC_FS 265#ifdef CONFIG_PROC_FS
298 266