mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-23 05:18:55 +00:00
fix nand-disable-badblock-check-for-migration patch
This commit is contained in:
parent
5d20888218
commit
0221ba5aef
1 changed files with 9 additions and 6 deletions
|
@ -14,18 +14,21 @@ index 71050a0..5f36704 100644
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -4252,16 +4249,7 @@ static int nand_block_isbad(struct mtd_info *mtd, loff_t offs)
|
||||
@@ -4283,19 +4283,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(chip, chipnr);
|
||||
- ret = nand_get_device(chip);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
- ret = nand_block_checkbad(mtd, offs, 0);
|
||||
- nand_select_target(chip, chipnr);
|
||||
-
|
||||
- chip->select_chip(chip, -1);
|
||||
- nand_release_device(mtd);
|
||||
- ret = nand_block_checkbad(chip, offs, 0);
|
||||
-
|
||||
- nand_deselect_target(chip);
|
||||
- nand_release_device(chip);
|
||||
-
|
||||
- return ret;
|
||||
+ return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue