Commit 2528e8cd authored by Thomas Gleixner's avatar Thomas Gleixner

[MTD] Remove readv/readv_ecc

These functions were never implemented and added only bloat to
partition and concat code.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 9d8522df
...@@ -212,31 +212,6 @@ static int part_writev (struct mtd_info *mtd, const struct kvec *vecs, ...@@ -212,31 +212,6 @@ static int part_writev (struct mtd_info *mtd, const struct kvec *vecs,
to + part->offset, retlen); 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) static int part_erase (struct mtd_info *mtd, struct erase_info *instr)
{ {
struct mtd_part *part = PART(mtd); struct mtd_part *part = PART(mtd);
...@@ -425,10 +400,6 @@ int add_mtd_partitions(struct mtd_info *master, ...@@ -425,10 +400,6 @@ int add_mtd_partitions(struct mtd_info *master,
} }
if (master->writev) if (master->writev)
slave->mtd.writev = part_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) if (master->lock)
slave->mtd.lock = part_lock; slave->mtd.lock = part_lock;
if (master->unlock) if (master->unlock)
......
...@@ -2531,7 +2531,6 @@ int nand_scan(struct mtd_info *mtd, int maxchips) ...@@ -2531,7 +2531,6 @@ int nand_scan(struct mtd_info *mtd, int maxchips)
mtd->write_ecc = nand_write_ecc; mtd->write_ecc = nand_write_ecc;
mtd->read_oob = nand_read_oob; mtd->read_oob = nand_read_oob;
mtd->write_oob = nand_write_oob; mtd->write_oob = nand_write_oob;
mtd->readv = NULL;
mtd->sync = nand_sync; mtd->sync = nand_sync;
mtd->lock = NULL; mtd->lock = NULL;
mtd->unlock = NULL; mtd->unlock = NULL;
......
...@@ -1824,8 +1824,6 @@ int onenand_scan(struct mtd_info *mtd, int maxchips) ...@@ -1824,8 +1824,6 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
mtd->write_user_prot_reg = onenand_write_user_prot_reg; mtd->write_user_prot_reg = onenand_write_user_prot_reg;
mtd->lock_user_prot_reg = onenand_lock_user_prot_reg; mtd->lock_user_prot_reg = onenand_lock_user_prot_reg;
#endif #endif
mtd->readv = NULL;
mtd->readv_ecc = NULL;
mtd->sync = onenand_sync; mtd->sync = onenand_sync;
mtd->lock = NULL; mtd->lock = NULL;
mtd->unlock = onenand_unlock; mtd->unlock = onenand_unlock;
......
...@@ -133,14 +133,10 @@ struct mtd_info { ...@@ -133,14 +133,10 @@ struct mtd_info {
int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); 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); 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, /* kvec-based read/write methods.
with its limited number of write cycles per erase.
NB: The 'count' parameter is the number of _vectors_, each of NB: The 'count' parameter is the number of _vectors_, each of
which contains an (ofs, len) tuple. 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); int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen);
/* Sync */ /* Sync */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment