[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>
This commit is contained in:
Thomas Gleixner
2006-05-27 20:36:12 +02:00
parent 8be834f762
commit ff268fb879
7 changed files with 9 additions and 28 deletions

View File

@@ -2142,14 +2142,6 @@ int nand_scan(struct mtd_info *mtd, int maxchips)
}
}
/*
* The number of bytes available for the filesystem to place fs
* dependend oob data
*/
mtd->oobavail = 0;
for (i = 0; chip->autooob->oobfree[i][1]; i++)
mtd->oobavail += chip->autooob->oobfree[i][1];
/*
* check ECC mode, default to software if 3byte/512byte hardware ECC is
* selected and we have 256 byte pagesize fallback to software ECC
@@ -2245,7 +2237,7 @@ int nand_scan(struct mtd_info *mtd, int maxchips)
mtd->block_markbad = nand_block_markbad;
/* and make the autooob the default one */
memcpy(&mtd->oobinfo, chip->autooob, sizeof(mtd->oobinfo));
mtd->oobinfo = chip->autooob;
/* Check, if we should skip the bad block table scan */
if (chip->options & NAND_SKIP_BBTSCAN)