| 1 | --- a/drivers/mtd/chips/cfi_cmdset_0002.c |
| 2 | +++ b/drivers/mtd/chips/cfi_cmdset_0002.c |
| 3 | @@ -1860,7 +1860,7 @@ static int __xipram do_erase_chip(struct |
| 4 | chip->erase_suspended = 0; |
| 5 | } |
| 6 | |
| 7 | - if (chip_ready(map, adr)) |
| 8 | + if (chip_good(map, adr, map_word_ff(map))) |
| 9 | break; |
| 10 | |
| 11 | if (time_after(jiffies, timeo)) { |
| 12 | @@ -1949,7 +1949,7 @@ static int __xipram do_erase_oneblock(st |
| 13 | chip->erase_suspended = 0; |
| 14 | } |
| 15 | |
| 16 | - if (chip_ready(map, adr)) { |
| 17 | + if (chip_good(map, adr, map_word_ff(map))) { |
| 18 | xip_enable(map, chip, adr); |
| 19 | break; |
| 20 | } |
| 21 | |