build/patch/kernel/sunxi-dev/nand-disable-badblock-check-for-migration.patch.disabled
2016-11-01 13:14:38 +03:00

35 lines
873 B
Text

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 77533f7..8b3b184 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -532,11 +532,7 @@ static int nand_block_checkbad(struct mtd_info *mtd, loff_t ofs, int allowbbt)
{
struct nand_chip *chip = mtd_to_nand(mtd);
- if (!chip->bbt)
- return chip->block_bad(mtd, ofs);
-
- /* Return info from the table */
- return nand_isbad_bbt(mtd, ofs, allowbbt);
+ return 0;
}
/**
@@ -3030,16 +3026,7 @@ static int nand_block_isbad(struct mtd_info *mtd, loff_t offs)
int chipnr = (int)(offs >> chip->chip_shift);
int ret;
- /* Select the NAND device */
- nand_get_device(mtd, FL_READING);
- chip->select_chip(mtd, chipnr);
-
- ret = nand_block_checkbad(mtd, offs, 0);
-
- chip->select_chip(mtd, -1);
- nand_release_device(mtd);
-
- return ret;
+ return 0;
}
/**