Date:2012-05-21 13:47:51 (10 years 4 months ago)
Author:Maarten ter Huurne
Commit:20fae707e41942cbb571dbf874ff371a3ee7d298
Message:mtd: cc_ftl: Use MTD API instead of calling function pointers directly.

Files: drivers/mtd/cc_ftl.c (3 diffs)

Change Details

drivers/mtd/cc_ftl.c
5757    phy_offs += mtd_mod_by_eb(log_offs, mtd);
5858
5959    /* Read data. */
60    ret = mtd->read(mtd, phy_offs, SECTOR_SIZE, &retlen, buffer);
60    ret = mtd_read(mtd, phy_offs, SECTOR_SIZE, &retlen, buffer);
6161    if (ret == -EUCLEAN) /* sector contains correctable errors */
6262        ret = 0;
6363    if (ret)
...... 
101101        uint32_t log_blk;
102102        int err;
103103
104        if (mtd->block_isbad(mtd, ofs))
104        if (mtd_block_isbad(mtd, ofs))
105105            continue;
106        err = mtd->read_oob(mtd, ofs, &oob_ops);
106        err = mtd_read_oob(mtd, ofs, &oob_ops);
107107        if (err)
108108            continue;
109109        signature = oob_buf[0] | ((uint16_t)oob_buf[1] << 8);
...... 
165165    if (mtd->type != MTD_NANDFLASH)
166166        return;
167167
168    /* A bad block table is expected. */
169    if (!mtd->block_isbad)
170        return;
171
172168    /* Erase size must be a power of two. */
173169    if (mtd->erasesize_shift == 0)
174170        return;

Archive Download the corresponding diff file



interactive