mtd/drivers/mtd mtdchar.c,1.50,1.51 mtdpart.c,1.33,1.34
gleixner at infradead.org
gleixner at infradead.org
Tue Feb 18 15:54:26 EST 2003
Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv23371/mtd/drivers/mtd
Modified Files:
mtdchar.c mtdpart.c
Log Message:
tglx declares himself healed from temporary brain damage and comes back to the original plan of passing
oob-layout structures. This implies minor changes to filesystem layers, but removes file system dependend
code in nand.c/.h. For userspace apps ioctl (MEMSETOOBSEL) can pass a structure with the layout, which
has to be used for functions like read/write, which have no knowledge about oob-layout. see util/nandwrite.c
Index: mtdchar.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtdchar.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- mtdchar.c 18 Feb 2003 10:09:07 -0000 1.50
+++ mtdchar.c 18 Feb 2003 20:53:53 -0000 1.51
@@ -444,9 +444,8 @@
case MEMSETOOBSEL:
{
- if (copy_from_user(&mtd->oobsel ,(void *)arg, sizeof(uint32_t)))
+ if (copy_from_user(&mtd->oobinfo ,(void *)arg, sizeof(struct nand_oobinfo)))
return -EFAULT;
-
break;
}
Index: mtdpart.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtdpart.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- mtdpart.c 18 Feb 2003 10:09:07 -0000 1.33
+++ mtdpart.c 18 Feb 2003 20:53:53 -0000 1.34
@@ -59,7 +59,7 @@
len, retlen, buf);
else
return part->master->read_ecc (part->master, from + part->offset,
- len, retlen, buf, NULL, &mtd->oobsel);
+ len, retlen, buf, NULL, &mtd->oobinfo);
}
static int part_point (struct mtd_info *mtd, loff_t from, size_t len,
@@ -82,11 +82,11 @@
static int part_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
- size_t *retlen, u_char *buf, u_char *eccbuf, int *oobsel)
+ size_t *retlen, u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel)
{
struct mtd_part *part = PART(mtd);
if (oobsel == NULL)
- oobsel = &mtd->oobsel;
+ oobsel = &mtd->oobinfo;
if (from >= mtd->size)
len = 0;
else if (from + len > mtd->size)
@@ -138,19 +138,19 @@
len, retlen, buf);
else
return part->master->write_ecc (part->master, to + part->offset,
- len, retlen, buf, NULL, &mtd->oobsel);
+ len, retlen, buf, NULL, &mtd->oobinfo);
}
static int part_write_ecc (struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf,
- u_char *eccbuf, int *oobsel)
+ u_char *eccbuf, struct nand_oobinfo *oobsel)
{
struct mtd_part *part = PART(mtd);
if (!(mtd->flags & MTD_WRITEABLE))
return -EROFS;
if (oobsel == NULL)
- oobsel = &mtd->oobsel;
+ oobsel = &mtd->oobinfo;
if (to >= mtd->size)
len = 0;
else if (to + len > mtd->size)
@@ -193,7 +193,7 @@
else
return part->master->writev_ecc (part->master, vecs, count,
to + part->offset, retlen,
- NULL, &mtd->oobsel);
+ NULL, &mtd->oobinfo);
}
static int part_readv (struct mtd_info *mtd, struct iovec *vecs,
@@ -206,18 +206,18 @@
else
return part->master->readv_ecc (part->master, vecs, count,
from + part->offset, retlen,
- NULL, &mtd->oobsel);
+ NULL, &mtd->oobinfo);
}
static int part_writev_ecc (struct mtd_info *mtd, const struct iovec *vecs,
unsigned long count, loff_t to, size_t *retlen,
- u_char *eccbuf, int *oobsel)
+ u_char *eccbuf, struct nand_oobinfo *oobsel)
{
struct mtd_part *part = PART(mtd);
if (!(mtd->flags & MTD_WRITEABLE))
return -EROFS;
if (oobsel == NULL)
- oobsel = &mtd->oobsel;
+ oobsel = &mtd->oobinfo;
return part->master->writev_ecc (part->master, vecs, count,
to + part->offset, retlen,
eccbuf, oobsel);
@@ -225,11 +225,11 @@
static int part_readv_ecc (struct mtd_info *mtd, struct iovec *vecs,
unsigned long count, loff_t from, size_t *retlen,
- u_char *eccbuf, int *oobsel)
+ u_char *eccbuf, struct nand_oobinfo *oobsel)
{
struct mtd_part *part = PART(mtd);
if (oobsel == NULL)
- oobsel = &mtd->oobsel;
+ oobsel = &mtd->oobinfo;
return part->master->readv_ecc (part->master, vecs, count,
from + part->offset, retlen,
eccbuf, oobsel);
@@ -345,7 +345,6 @@
slave->mtd.oobsize = master->oobsize;
slave->mtd.ecctype = master->ecctype;
slave->mtd.eccsize = master->eccsize;
- slave->mtd.oobsel = parts[i].oobsel;
slave->mtd.name = parts[i].name;
slave->mtd.bank_size = master->bank_size;
More information about the linux-mtd-cvs
mailing list