mtd/drivers/mtd/nand nand_base.c,1.137,1.138
gleixner at infradead.org
gleixner at infradead.org
Fri Apr 1 02:21:48 EST 2005
Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv9108
Modified Files:
nand_base.c
Log Message:
Use oobfree to calculate the number of oob bytes available for fs usage
Index: nand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- nand_base.c 24 Mar 2005 14:33:22 -0000 1.137
+++ nand_base.c 1 Apr 2005 07:21:44 -0000 1.138
@@ -2512,12 +2512,9 @@
/* The number of bytes available for the filesystem to place fs dependend
* oob data */
- if (this->options & NAND_BUSWIDTH_16) {
- mtd->oobavail = mtd->oobsize - (this->autooob->eccbytes + 2);
- if (this->autooob->eccbytes & 0x01)
- mtd->oobavail--;
- } else
- mtd->oobavail = mtd->oobsize - (this->autooob->eccbytes + 1);
+ mtd->oobavail = 0;
+ for (i = 0; this->autooob->oobfree[i][1]; i++)
+ mtd->oobavail += this->autooob->oobfree[i][1];
/*
* check ECC mode, default to software
More information about the linux-mtd-cvs
mailing list