]> Pileus Git - ~andy/linux/blobdiff - drivers/mtd/redboot.c
Merge branch 'master' into fixes
[~andy/linux] / drivers / mtd / redboot.c
index 623d9b86d0d9d75a0c50355d35fe9a8d9e8a39cb..48970c14beffd911fd154e53dd3b56690f03d4f9 100644 (file)
@@ -78,8 +78,8 @@ static int parse_redboot_partitions(struct mtd_info *master,
 
        if ( directory < 0 ) {
                offset = master->size + directory * master->erasesize;
-               while (master->block_isbad && 
-                      master->block_isbad(master, offset)) {
+               while (mtd_can_have_bb(master) &&
+                      mtd_block_isbad(master, offset)) {
                        if (!offset) {
                        nogood:
                                printk(KERN_NOTICE "Failed to find a non-bad block to check for RedBoot partition table\n");
@@ -89,8 +89,8 @@ static int parse_redboot_partitions(struct mtd_info *master,
                }
        } else {
                offset = directory * master->erasesize;
-               while (master->block_isbad && 
-                      master->block_isbad(master, offset)) {
+               while (mtd_can_have_bb(master) &&
+                      mtd_block_isbad(master, offset)) {
                        offset += master->erasesize;
                        if (offset == master->size)
                                goto nogood;