]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/nftlmount.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[linux-2.6-omap-h63xx.git] / drivers / mtd / nftlmount.c
index 521b07cd2326c68b9eeb6c228976861ac69b0189..345e6eff89ce5929c3548d1874b6363b102ae554 100644 (file)
@@ -92,7 +92,7 @@ static int find_boot_record(struct NFTLrecord *nftl)
                }
 
                /* To be safer with BIOS, also use erase mark as discriminant */
-               if ((ret = mtd->read_oob(mtd, block * nftl->EraseSize +
+               if ((ret = nftl_read_oob(mtd, block * nftl->EraseSize +
                                         SECTORSIZE + 8, 8, &retlen,
                                         (char *)&h1) < 0)) {
                        printk(KERN_WARNING "ANAND header found at 0x%x in mtd%d, but OOB data read failed (err %d)\n",
@@ -283,7 +283,7 @@ static int check_free_sectors(struct NFTLrecord *nftl, unsigned int address, int
                        return -1;
 
                if (check_oob) {
-                       if(mtd->read_oob(mtd, address, mtd->oobsize,
+                       if(nftl_read_oob(mtd, address, mtd->oobsize,
                                         &retlen, &buf[SECTORSIZE]) < 0)
                                return -1;
                        if (memcmpb(buf + SECTORSIZE, 0xff, mtd->oobsize) != 0)
@@ -311,7 +311,7 @@ int NFTL_formatblock(struct NFTLrecord *nftl, int block)
        struct mtd_info *mtd = nftl->mbd.mtd;
 
        /* Read the Unit Control Information #1 for Wear-Leveling */
-       if (mtd->read_oob(mtd, block * nftl->EraseSize + SECTORSIZE + 8,
+       if (nftl_read_oob(mtd, block * nftl->EraseSize + SECTORSIZE + 8,
                          8, &retlen, (char *)&uci) < 0)
                goto default_uci1;
 
@@ -351,7 +351,7 @@ int NFTL_formatblock(struct NFTLrecord *nftl, int block)
                        goto fail;
 
                uci.WearInfo = le32_to_cpu(nb_erases);
-               if (mtd->write_oob(mtd, block * nftl->EraseSize + SECTORSIZE +
+               if (nftl_write_oob(mtd, block * nftl->EraseSize + SECTORSIZE +
                                   8, 8, &retlen, (char *)&uci) < 0)
                        goto fail;
                return 0;
@@ -383,7 +383,7 @@ static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_b
        block = first_block;
        for (;;) {
                for (i = 0; i < sectors_per_block; i++) {
-                       if (mtd->read_oob(mtd,
+                       if (nftl_read_oob(mtd,
                                          block * nftl->EraseSize + i * SECTORSIZE,
                                          8, &retlen, (char *)&bci) < 0)
                                status = SECTOR_IGNORE;
@@ -404,7 +404,7 @@ static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_b
                                        /* sector not free actually : mark it as SECTOR_IGNORE  */
                                        bci.Status = SECTOR_IGNORE;
                                        bci.Status1 = SECTOR_IGNORE;
-                                       mtd->write_oob(mtd, block *
+                                       nftl_write_oob(mtd, block *
                                                       nftl->EraseSize +
                                                       i * SECTORSIZE, 8,
                                                       &retlen, (char *)&bci);
@@ -424,7 +424,7 @@ static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_b
        }
 }
 
-/* calc_chain_lenght: Walk through a Virtual Unit Chain and estimate chain length */
+/* calc_chain_length: Walk through a Virtual Unit Chain and estimate chain length */
 static int calc_chain_length(struct NFTLrecord *nftl, unsigned int first_block)
 {
        unsigned int length = 0, block = first_block;
@@ -498,7 +498,7 @@ static int check_and_mark_free_block(struct NFTLrecord *nftl, int block)
        size_t retlen;
 
        /* check erase mark. */
-       if (mtd->read_oob(mtd, block * nftl->EraseSize + SECTORSIZE + 8, 8,
+       if (nftl_read_oob(mtd, block * nftl->EraseSize + SECTORSIZE + 8, 8,
                          &retlen, (char *)&h1) < 0)
                return -1;
 
@@ -513,7 +513,7 @@ static int check_and_mark_free_block(struct NFTLrecord *nftl, int block)
                h1.EraseMark = cpu_to_le16(ERASE_MARK);
                h1.EraseMark1 = cpu_to_le16(ERASE_MARK);
                h1.WearInfo = cpu_to_le32(0);
-               if (mtd->write_oob(mtd,
+               if (nftl_write_oob(mtd,
                                   block * nftl->EraseSize + SECTORSIZE + 8, 8,
                                   &retlen, (char *)&h1) < 0)
                        return -1;
@@ -526,7 +526,7 @@ static int check_and_mark_free_block(struct NFTLrecord *nftl, int block)
                                                SECTORSIZE, 0) != 0)
                                return -1;
 
-                       if (mtd->read_oob(mtd, block * nftl->EraseSize + i,
+                       if (nftl_read_oob(mtd, block * nftl->EraseSize + i,
                                          16, &retlen, buf) < 0)
                                return -1;
                        if (i == SECTORSIZE) {
@@ -557,7 +557,7 @@ static int get_fold_mark(struct NFTLrecord *nftl, unsigned int block)
        struct nftl_uci2 uci;
        size_t retlen;
 
-       if (mtd->read_oob(mtd, block * nftl->EraseSize + 2 * SECTORSIZE + 8,
+       if (nftl_read_oob(mtd, block * nftl->EraseSize + 2 * SECTORSIZE + 8,
                          8, &retlen, (char *)&uci) < 0)
                return 0;
 
@@ -597,10 +597,10 @@ int NFTL_mount(struct NFTLrecord *s)
 
                        for (;;) {
                                /* read the block header. If error, we format the chain */
-                               if (mtd->read_oob(mtd,
+                               if (nftl_read_oob(mtd,
                                                  block * s->EraseSize + 8, 8,
                                                  &retlen, (char *)&h0) < 0 ||
-                                   mtd->read_oob(mtd,
+                                   nftl_read_oob(mtd,
                                                  block * s->EraseSize +
                                                  SECTORSIZE + 8, 8,
                                                  &retlen, (char *)&h1) < 0) {