balena-allwinner/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline/armbian/nand-disable-badblock-check-for-migration.patch
Vicentiu Galanopulo 7d5f1dbda1 recipes-kernel/linux: Remove unused patches and householding
Some patches were part of other linux-mainline
kernel versions but are not anymore part of the
current 4.19.76.

Move 0001-Enable-uart3-for-NanoPi-Neo-Air-used-by-BT.patch
in linux-mainline_4.19.76.bbappend to avoid error
patching file arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
Hunk #2 FAILED at 162.
1 out of 2 hunks FAILED -- rejects in file arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts

Place all patches from Armbian in a separate directory and do all the Balena specific
operations in linux-mainline_%.bbappend only.

Changelog-entry: Remove unused patches and cleanup
Signed-off-by: Vicentiu Galanopulo <vicentiu@balena.io>
2019-10-14 09:43:01 +02:00

35 lines
889 B
Diff

diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 77533f7..8b3b184 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/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;
}
/**