From ff268fb8791cf18df536113355d7184007c269d9 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 27 May 2006 20:36:12 +0200 Subject: [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 --- drivers/mtd/nand/nand_base.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'drivers/mtd/nand/nand_base.c') diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 023224dd12e..20f79fec73b 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -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) -- cgit v1.2.3