aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-27 14:36:12 -0400
committerThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-29 09:06:49 -0400
commitff268fb8791cf18df536113355d7184007c269d9 (patch)
tree3a7d9fc72b28f5a0f11a2f8b08174b1bee6ea20d /drivers/mtd/nand
parent8be834f76291fdcc0614cb84926c6910b9f2ecbc (diff)
[MTD] NAND Consolidate oobinfo handling
The info structure for out of band data was copied into the mtd structure. Make it a pointer and remove the ability to set it from userspace. The position of ecc bytes is defined by the hardware and should not be changed by software. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/nand_base.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 023224dd12eb..20f79fec73b5 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2143,14 +2143,6 @@ int nand_scan(struct mtd_info *mtd, int maxchips)
2143 } 2143 }
2144 2144
2145 /* 2145 /*
2146 * The number of bytes available for the filesystem to place fs
2147 * dependend oob data
2148 */
2149 mtd->oobavail = 0;
2150 for (i = 0; chip->autooob->oobfree[i][1]; i++)
2151 mtd->oobavail += chip->autooob->oobfree[i][1];
2152
2153 /*
2154 * check ECC mode, default to software if 3byte/512byte hardware ECC is 2146 * check ECC mode, default to software if 3byte/512byte hardware ECC is
2155 * selected and we have 256 byte pagesize fallback to software ECC 2147 * selected and we have 256 byte pagesize fallback to software ECC
2156 */ 2148 */
@@ -2245,7 +2237,7 @@ int nand_scan(struct mtd_info *mtd, int maxchips)
2245 mtd->block_markbad = nand_block_markbad; 2237 mtd->block_markbad = nand_block_markbad;
2246 2238
2247 /* and make the autooob the default one */ 2239 /* and make the autooob the default one */
2248 memcpy(&mtd->oobinfo, chip->autooob, sizeof(mtd->oobinfo)); 2240 mtd->oobinfo = chip->autooob;
2249 2241
2250 /* Check, if we should skip the bad block table scan */ 2242 /* Check, if we should skip the bad block table scan */
2251 if (chip->options & NAND_SKIP_BBTSCAN) 2243 if (chip->options & NAND_SKIP_BBTSCAN)