summaryrefslogtreecommitdiff
path: root/drivers/mtd/redboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/redboot.c')
-rw-r--r--drivers/mtd/redboot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
index 09bb81ea3a7e..48970c14beff 100644
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
@@ -78,7 +78,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
if ( directory < 0 ) {
offset = master->size + directory * master->erasesize;
- while (master->block_isbad &&
+ while (mtd_can_have_bb(master) &&
mtd_block_isbad(master, offset)) {
if (!offset) {
nogood:
@@ -89,7 +89,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
}
} else {
offset = directory * master->erasesize;
- while (master->block_isbad &&
+ while (mtd_can_have_bb(master) &&
mtd_block_isbad(master, offset)) {
offset += master->erasesize;
if (offset == master->size)