mtd: rename MTD_OOB_* to MTD_OPS_*
[pandora-kernel.git] / drivers / mtd / devices / doc2000.c
index 5bf5f46..e9fad91 100644 (file)
@@ -82,8 +82,7 @@ static int _DoC_WaitReady(struct DiskOnChip *doc)
        void __iomem *docptr = doc->virtadr;
        unsigned long timeo = jiffies + (HZ * 10);
 
-       DEBUG(MTD_DEBUG_LEVEL3,
-             "_DoC_WaitReady called for out-of-line wait\n");
+       pr_debug("_DoC_WaitReady called for out-of-line wait\n");
 
        /* Out-of-line routine to wait for chip response */
        while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) {
@@ -92,7 +91,7 @@ static int _DoC_WaitReady(struct DiskOnChip *doc)
                DoC_Delay(doc, 2);
 
                if (time_after(jiffies, timeo)) {
-                       DEBUG(MTD_DEBUG_LEVEL2, "_DoC_WaitReady timed out.\n");
+                       pr_debug("_DoC_WaitReady timed out.\n");
                        return -EIO;
                }
                udelay(1);
@@ -323,8 +322,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip)
 
        /* Reset the chip */
        if (DoC_Command(doc, NAND_CMD_RESET, CDSN_CTRL_WP)) {
-               DEBUG(MTD_DEBUG_LEVEL2,
-                     "DoC_Command (reset) for %d,%d returned true\n",
+               pr_debug("DoC_Command (reset) for %d,%d returned true\n",
                      floor, chip);
                return 0;
        }
@@ -332,8 +330,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip)
 
        /* Read the NAND chip ID: 1. Send ReadID command */
        if (DoC_Command(doc, NAND_CMD_READID, CDSN_CTRL_WP)) {
-               DEBUG(MTD_DEBUG_LEVEL2,
-                     "DoC_Command (ReadID) for %d,%d returned true\n",
+               pr_debug("DoC_Command (ReadID) for %d,%d returned true\n",
                      floor, chip);
                return 0;
        }
@@ -597,7 +594,7 @@ void DoC2k_init(struct mtd_info *mtd)
                doc2klist = mtd;
                mtd->size = this->totlen;
                mtd->erasesize = this->erasesize;
-               add_mtd_device(mtd);
+               mtd_device_register(mtd, NULL, 0);
                return;
        }
 }
@@ -699,7 +696,7 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len,
 #ifdef ECC_DEBUG
                        printk(KERN_ERR "DiskOnChip ECC Error: Read at %lx\n", (long)from);
 #endif
-                       /* Read the ECC syndrom through the DiskOnChip ECC
+                       /* Read the ECC syndrome through the DiskOnChip ECC
                           logic.  These syndrome will be all ZERO when there
                           is no error */
                        for (i = 0; i < 6; i++) {
@@ -930,7 +927,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs,
        uint8_t *buf = ops->oobbuf;
        size_t len = ops->len;
 
-       BUG_ON(ops->mode != MTD_OOB_PLACE);
+       BUG_ON(ops->mode != MTD_OPS_PLACE_OOB);
 
        ofs += ops->ooboffs;
 
@@ -1094,7 +1091,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs,
        struct DiskOnChip *this = mtd->priv;
        int ret;
 
-       BUG_ON(ops->mode != MTD_OOB_PLACE);
+       BUG_ON(ops->mode != MTD_OPS_PLACE_OOB);
 
        mutex_lock(&this->lock);
        ret = doc_write_oob_nolock(mtd, ofs + ops->ooboffs, ops->len,
@@ -1185,7 +1182,7 @@ static void __exit cleanup_doc2000(void)
                this = mtd->priv;
                doc2klist = this->nextdoc;
 
-               del_mtd_device(mtd);
+               mtd_device_unregister(mtd);
 
                iounmap(this->virtadr);
                kfree(this->chips);