mtd: introduce mtd_block_isbad interface
[sfrench/cifs-2.6.git] / drivers / mtd / redboot.c
index e366b1d84eade1685821dcf5021427e993656842..09bb81ea3a7ebc8a631f8729c729cd70e98d6ddb 100644 (file)
@@ -79,7 +79,7 @@ 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)) {
+                      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");
@@ -90,7 +90,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
        } else {
                offset = directory * master->erasesize;
                while (master->block_isbad && 
-                      master->block_isbad(master, offset)) {
+                      mtd_block_isbad(master, offset)) {
                        offset += master->erasesize;
                        if (offset == master->size)
                                goto nogood;
@@ -104,8 +104,8 @@ static int parse_redboot_partitions(struct mtd_info *master,
        printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
               master->name, offset);
 
-       ret = master->read(master, offset,
-                          master->erasesize, &retlen, (void *)buf);
+       ret = mtd_read(master, offset, master->erasesize, &retlen,
+                      (void *)buf);
 
        if (ret)
                goto out;