]> Pileus Git - ~andy/linux/blobdiff - drivers/mtd/inftlmount.c
Merge branch 'akpm' (aka "Andrew's patch-bomb")
[~andy/linux] / drivers / mtd / inftlmount.c
index 0d946f10a682f1b9123c8b25e9834bd9251b638d..4adc0374fb6b5736ba23cdc77f5f8ebb2bb7117b 100644 (file)
@@ -73,8 +73,8 @@ static int find_boot_record(struct INFTLrecord *inftl)
                 * Check for BNAND header first. Then whinge if it's found
                 * but later checks fail.
                 */
-               ret = mtd->read(mtd, block * inftl->EraseSize,
-                               SECTORSIZE, &retlen, buf);
+               ret = mtd_read(mtd, block * inftl->EraseSize, SECTORSIZE,
+                              &retlen, buf);
                /* We ignore ret in case the ECC of the MediaHeader is invalid
                   (which is apparently acceptable) */
                if (retlen != SECTORSIZE) {
@@ -118,8 +118,8 @@ static int find_boot_record(struct INFTLrecord *inftl)
                memcpy(mh, buf, sizeof(struct INFTLMediaHeader));
 
                /* Read the spare media header at offset 4096 */
-               mtd->read(mtd, block * inftl->EraseSize + 4096,
-                         SECTORSIZE, &retlen, buf);
+               mtd_read(mtd, block * inftl->EraseSize + 4096, SECTORSIZE,
+                        &retlen, buf);
                if (retlen != SECTORSIZE) {
                        printk(KERN_WARNING "INFTL: Unable to read spare "
                               "Media Header\n");
@@ -306,7 +306,8 @@ static int find_boot_record(struct INFTLrecord *inftl)
                        /* If any of the physical eraseblocks are bad, don't
                           use the unit. */
                        for (physblock = 0; physblock < inftl->EraseSize; physblock += inftl->mbd.mtd->erasesize) {
-                               if (inftl->mbd.mtd->block_isbad(inftl->mbd.mtd, i * inftl->EraseSize + physblock))
+                               if (mtd_block_isbad(inftl->mbd.mtd,
+                                                   i * inftl->EraseSize + physblock))
                                        inftl->PUtable[i] = BLOCK_RESERVED;
                        }
                }
@@ -342,7 +343,7 @@ static int check_free_sectors(struct INFTLrecord *inftl, unsigned int address,
        int i;
 
        for (i = 0; i < len; i += SECTORSIZE) {
-               if (mtd->read(mtd, address, SECTORSIZE, &retlen, buf))
+               if (mtd_read(mtd, address, SECTORSIZE, &retlen, buf))
                        return -1;
                if (memcmpb(buf, 0xff, SECTORSIZE) != 0)
                        return -1;
@@ -423,7 +424,7 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block)
 fail:
        /* could not format, update the bad block table (caller is responsible
           for setting the PUtable to BLOCK_RESERVED on failure) */
-       inftl->mbd.mtd->block_markbad(inftl->mbd.mtd, instr->addr);
+       mtd_block_markbad(inftl->mbd.mtd, instr->addr);
        return -1;
 }