mtd/drivers/mtd/nand nand_bbt.c,1.8,1.9
gleixner at infradead.org
gleixner at infradead.org
Fri May 28 06:59:41 EDT 2004
Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv20992
Modified Files:
nand_bbt.c
Log Message:
Do not use default tables, if the caller supplied one. Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
Index: nand_bbt.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_bbt.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- nand_bbt.c 28 May 2004 10:58:19 -0000 1.8
+++ nand_bbt.c 28 May 2004 10:59:38 -0000 1.9
@@ -836,8 +836,10 @@
*/
if (this->options & NAND_IS_AND) {
/* Use the default pattern descriptors */
- this->bbt_td = &bbt_main_descr;
- this->bbt_md = &bbt_mirror_descr;
+ if (!this->bbt_td) {
+ this->bbt_td = &bbt_main_descr;
+ this->bbt_md = &bbt_mirror_descr;
+ }
this->options |= NAND_USE_FLASH_BBT;
return nand_scan_bbt (mtd, &agand_flashbased);
}
@@ -845,8 +847,10 @@
/* Is a flash based bad block table requested ? */
if (this->options & NAND_USE_FLASH_BBT) {
/* Use the default pattern descriptors */
- this->bbt_td = &bbt_main_descr;
- this->bbt_md = &bbt_mirror_descr;
+ if (!this->bbt_td) {
+ this->bbt_td = &bbt_main_descr;
+ this->bbt_md = &bbt_mirror_descr;
+ }
if (mtd->oobblock > 512)
return nand_scan_bbt (mtd, &largepage_flashbased);
else
More information about the linux-mtd-cvs
mailing list