]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mtd: replace DEBUG() with pr_debug()
authorBrian Norris <computersforpeace@gmail.com>
Tue, 19 Jul 2011 17:06:09 +0000 (10:06 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:36:02 +0000 (08:36 +0200)
Start moving away from the MTD_DEBUG_LEVEL messages. The dynamic
debugging feature is a generic kernel feature that provides more
flexibility.

(See Documentation/dynamic-debug-howto.txt)

Also fix some punctuation, indentation, and capitalization that went
along with the affected lines.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
drivers/mtd/chips/cfi_cmdset_0002.c

index 727fd9c53199c0764755d2a84beeb9e1edbe0994..5a478b51463f2a86dde3998930541da29a82a793 100644 (file)
@@ -145,8 +145,7 @@ static void fixup_amd_bootblock(struct mtd_info *mtd)
        if (((major << 8) | minor) < 0x3131) {
                /* CFI version 1.0 => don't trust bootloc */
 
-               DEBUG(MTD_DEBUG_LEVEL1,
-                       "%s: JEDEC Vendor ID is 0x%02X Device ID is 0x%02X\n",
+               pr_debug("%s: JEDEC Vendor ID is 0x%02X Device ID is 0x%02X\n",
                        map->name, cfi->mfr, cfi->id);
 
                /* AFAICS all 29LV400 with a bottom boot block have a device ID
@@ -166,8 +165,7 @@ static void fixup_amd_bootblock(struct mtd_info *mtd)
                         * the 8-bit device ID.
                         */
                        (cfi->mfr == CFI_MFR_MACRONIX)) {
-                       DEBUG(MTD_DEBUG_LEVEL1,
-                               "%s: Macronix MX29LV400C with bottom boot block"
+                       pr_debug("%s: Macronix MX29LV400C with bottom boot block"
                                " detected\n", map->name);
                        extp->TopBottom = 2;    /* bottom boot */
                } else
@@ -178,8 +176,7 @@ static void fixup_amd_bootblock(struct mtd_info *mtd)
                        extp->TopBottom = 2;    /* bottom boot */
                }
 
-               DEBUG(MTD_DEBUG_LEVEL1,
-                       "%s: AMD CFI PRI V%c.%c has no boot block field;"
+               pr_debug("%s: AMD CFI PRI V%c.%c has no boot block field;"
                        " deduced %s from Device ID\n", map->name, major, minor,
                        extp->TopBottom == 2 ? "bottom" : "top");
        }
@@ -191,7 +188,7 @@ static void fixup_use_write_buffers(struct mtd_info *mtd)
        struct map_info *map = mtd->priv;
        struct cfi_private *cfi = map->fldrv_priv;
        if (cfi->cfiq->BufWriteTimeoutTyp) {
-               DEBUG(MTD_DEBUG_LEVEL1, "Using buffer write method\n" );
+               pr_debug("Using buffer write method\n" );
                mtd->write = cfi_amdstd_write_buffers;
        }
 }
@@ -443,7 +440,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
        mtd->writesize = 1;
        mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize;
 
-       DEBUG(MTD_DEBUG_LEVEL3, "MTD %s(): write buffer size %d\n",
+       pr_debug("MTD %s(): write buffer size %d\n",
                __func__, mtd->writebufsize);
 
        mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot;
@@ -1163,7 +1160,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
                return ret;
        }
 
-       DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): WRITE 0x%.8lx(0x%.8lx)\n",
+       pr_debug("MTD %s(): WRITE 0x%.8lx(0x%.8lx)\n",
               __func__, adr, datum.x[0] );
 
        /*
@@ -1174,7 +1171,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
         */
        oldd = map_read(map, adr);
        if (map_word_equal(map, oldd, datum)) {
-               DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): NOP\n",
+               pr_debug("MTD %s(): NOP\n",
                       __func__);
                goto op_done;
        }
@@ -1400,7 +1397,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
 
        datum = map_word_load(map, buf);
 
-       DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): WRITE 0x%.8lx(0x%.8lx)\n",
+       pr_debug("MTD %s(): WRITE 0x%.8lx(0x%.8lx)\n",
               __func__, adr, datum.x[0] );
 
        XIP_INVAL_CACHED_RANGE(map, adr, len);
@@ -1587,7 +1584,7 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
                return ret;
        }
 
-       DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): ERASE 0x%.8lx\n",
+       pr_debug("MTD %s(): ERASE 0x%.8lx\n",
               __func__, chip->start );
 
        XIP_INVAL_CACHED_RANGE(map, adr, map->size);
@@ -1675,7 +1672,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
                return ret;
        }
 
-       DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): ERASE 0x%.8lx\n",
+       pr_debug("MTD %s(): ERASE 0x%.8lx\n",
               __func__, adr );
 
        XIP_INVAL_CACHED_RANGE(map, adr, len);
@@ -1801,7 +1798,7 @@ static int do_atmel_lock(struct map_info *map, struct flchip *chip,
                goto out_unlock;
        chip->state = FL_LOCKING;
 
-       DEBUG(MTD_DEBUG_LEVEL3, "MTD %s(): LOCK 0x%08lx len %d\n",
+       pr_debug("MTD %s(): LOCK 0x%08lx len %d\n",
              __func__, adr, len);
 
        cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi,
@@ -1837,7 +1834,7 @@ static int do_atmel_unlock(struct map_info *map, struct flchip *chip,
                goto out_unlock;
        chip->state = FL_UNLOCKING;
 
-       DEBUG(MTD_DEBUG_LEVEL3, "MTD %s(): LOCK 0x%08lx len %d\n",
+       pr_debug("MTD %s(): LOCK 0x%08lx len %d\n",
              __func__, adr, len);
 
        cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi,