aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-07-19 13:06:09 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-11 08:02:16 -0400
commit289c05222172b51401dbbb017115655f241d94ab (patch)
tree1fd2c801102a8c4a085f75a08c766d3250491962 /drivers/mtd/devices
parentd037021953922ebdbc34b98b8c4648017b1c6e89 (diff)
mtd: replace DEBUG() with pr_debug()
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>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/doc2000.c11
-rw-r--r--drivers/mtd/devices/doc2001.c5
-rw-r--r--drivers/mtd/devices/doc2001plus.c5
-rw-r--r--drivers/mtd/devices/m25p80.c20
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c43
-rw-r--r--drivers/mtd/devices/sst25l.c3
6 files changed, 39 insertions, 48 deletions
diff --git a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c
index ed15447c392e..8c9703309496 100644
--- a/drivers/mtd/devices/doc2000.c
+++ b/drivers/mtd/devices/doc2000.c
@@ -82,8 +82,7 @@ static int _DoC_WaitReady(struct DiskOnChip *doc)
82 void __iomem *docptr = doc->virtadr; 82 void __iomem *docptr = doc->virtadr;
83 unsigned long timeo = jiffies + (HZ * 10); 83 unsigned long timeo = jiffies + (HZ * 10);
84 84
85 DEBUG(MTD_DEBUG_LEVEL3, 85 pr_debug("_DoC_WaitReady called for out-of-line wait\n");
86 "_DoC_WaitReady called for out-of-line wait\n");
87 86
88 /* Out-of-line routine to wait for chip response */ 87 /* Out-of-line routine to wait for chip response */
89 while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) { 88 while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) {
@@ -92,7 +91,7 @@ static int _DoC_WaitReady(struct DiskOnChip *doc)
92 DoC_Delay(doc, 2); 91 DoC_Delay(doc, 2);
93 92
94 if (time_after(jiffies, timeo)) { 93 if (time_after(jiffies, timeo)) {
95 DEBUG(MTD_DEBUG_LEVEL2, "_DoC_WaitReady timed out.\n"); 94 pr_debug("_DoC_WaitReady timed out.\n");
96 return -EIO; 95 return -EIO;
97 } 96 }
98 udelay(1); 97 udelay(1);
@@ -323,8 +322,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip)
323 322
324 /* Reset the chip */ 323 /* Reset the chip */
325 if (DoC_Command(doc, NAND_CMD_RESET, CDSN_CTRL_WP)) { 324 if (DoC_Command(doc, NAND_CMD_RESET, CDSN_CTRL_WP)) {
326 DEBUG(MTD_DEBUG_LEVEL2, 325 pr_debug("DoC_Command (reset) for %d,%d returned true\n",
327 "DoC_Command (reset) for %d,%d returned true\n",
328 floor, chip); 326 floor, chip);
329 return 0; 327 return 0;
330 } 328 }
@@ -332,8 +330,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip)
332 330
333 /* Read the NAND chip ID: 1. Send ReadID command */ 331 /* Read the NAND chip ID: 1. Send ReadID command */
334 if (DoC_Command(doc, NAND_CMD_READID, CDSN_CTRL_WP)) { 332 if (DoC_Command(doc, NAND_CMD_READID, CDSN_CTRL_WP)) {
335 DEBUG(MTD_DEBUG_LEVEL2, 333 pr_debug("DoC_Command (ReadID) for %d,%d returned true\n",
336 "DoC_Command (ReadID) for %d,%d returned true\n",
337 floor, chip); 334 floor, chip);
338 return 0; 335 return 0;
339 } 336 }
diff --git a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c
index c6ea8604a3c3..3d2b459cea92 100644
--- a/drivers/mtd/devices/doc2001.c
+++ b/drivers/mtd/devices/doc2001.c
@@ -55,15 +55,14 @@ static int _DoC_WaitReady(void __iomem * docptr)
55{ 55{
56 unsigned short c = 0xffff; 56 unsigned short c = 0xffff;
57 57
58 DEBUG(MTD_DEBUG_LEVEL3, 58 pr_debug("_DoC_WaitReady called for out-of-line wait\n");
59 "_DoC_WaitReady called for out-of-line wait\n");
60 59
61 /* Out-of-line routine to wait for chip response */ 60 /* Out-of-line routine to wait for chip response */
62 while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B) && --c) 61 while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B) && --c)
63 ; 62 ;
64 63
65 if (c == 0) 64 if (c == 0)
66 DEBUG(MTD_DEBUG_LEVEL2, "_DoC_WaitReady timed out.\n"); 65 pr_debug("_DoC_WaitReady timed out.\n");
67 66
68 return (c == 0); 67 return (c == 0);
69} 68}
diff --git a/drivers/mtd/devices/doc2001plus.c b/drivers/mtd/devices/doc2001plus.c
index fe82fbfa155e..d28c9d99979f 100644
--- a/drivers/mtd/devices/doc2001plus.c
+++ b/drivers/mtd/devices/doc2001plus.c
@@ -61,15 +61,14 @@ static int _DoC_WaitReady(void __iomem * docptr)
61{ 61{
62 unsigned int c = 0xffff; 62 unsigned int c = 0xffff;
63 63
64 DEBUG(MTD_DEBUG_LEVEL3, 64 pr_debug("_DoC_WaitReady called for out-of-line wait\n");
65 "_DoC_WaitReady called for out-of-line wait\n");
66 65
67 /* Out-of-line routine to wait for chip response */ 66 /* Out-of-line routine to wait for chip response */
68 while (((ReadDOC(docptr, Mplus_FlashControl) & CDSN_CTRL_FR_B_MASK) != CDSN_CTRL_FR_B_MASK) && --c) 67 while (((ReadDOC(docptr, Mplus_FlashControl) & CDSN_CTRL_FR_B_MASK) != CDSN_CTRL_FR_B_MASK) && --c)
69 ; 68 ;
70 69
71 if (c == 0) 70 if (c == 0)
72 DEBUG(MTD_DEBUG_LEVEL2, "_DoC_WaitReady timed out.\n"); 71 pr_debug("_DoC_WaitReady timed out.\n");
73 72
74 return (c == 0); 73 return (c == 0);
75} 74}
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 66a3555f07d9..6417bd6b36ff 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -208,7 +208,7 @@ static int wait_till_ready(struct m25p *flash)
208 */ 208 */
209static int erase_chip(struct m25p *flash) 209static int erase_chip(struct m25p *flash)
210{ 210{
211 DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %lldKiB\n", 211 pr_debug("%s: %s %lldKiB\n",
212 dev_name(&flash->spi->dev), __func__, 212 dev_name(&flash->spi->dev), __func__,
213 (long long)(flash->mtd.size >> 10)); 213 (long long)(flash->mtd.size >> 10));
214 214
@@ -249,7 +249,7 @@ static int m25p_cmdsz(struct m25p *flash)
249 */ 249 */
250static int erase_sector(struct m25p *flash, u32 offset) 250static int erase_sector(struct m25p *flash, u32 offset)
251{ 251{
252 DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB at 0x%08x\n", 252 pr_debug("%s: %s %dKiB at 0x%08x\n",
253 dev_name(&flash->spi->dev), __func__, 253 dev_name(&flash->spi->dev), __func__,
254 flash->mtd.erasesize / 1024, offset); 254 flash->mtd.erasesize / 1024, offset);
255 255
@@ -285,7 +285,7 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr)
285 u32 addr,len; 285 u32 addr,len;
286 uint32_t rem; 286 uint32_t rem;
287 287
288 DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%llx, len %lld\n", 288 pr_debug("%s: %s %s 0x%llx, len %lld\n",
289 dev_name(&flash->spi->dev), __func__, "at", 289 dev_name(&flash->spi->dev), __func__, "at",
290 (long long)instr->addr, (long long)instr->len); 290 (long long)instr->addr, (long long)instr->len);
291 291
@@ -347,7 +347,7 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len,
347 struct spi_transfer t[2]; 347 struct spi_transfer t[2];
348 struct spi_message m; 348 struct spi_message m;
349 349
350 DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", 350 pr_debug("%s: %s %s 0x%08x, len %zd\n",
351 dev_name(&flash->spi->dev), __func__, "from", 351 dev_name(&flash->spi->dev), __func__, "from",
352 (u32)from, len); 352 (u32)from, len);
353 353
@@ -416,7 +416,7 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,
416 struct spi_transfer t[2]; 416 struct spi_transfer t[2];
417 struct spi_message m; 417 struct spi_message m;
418 418
419 DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", 419 pr_debug("%s: %s %s 0x%08x, len %zd\n",
420 dev_name(&flash->spi->dev), __func__, "to", 420 dev_name(&flash->spi->dev), __func__, "to",
421 (u32)to, len); 421 (u32)to, len);
422 422
@@ -509,7 +509,7 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len,
509 size_t actual; 509 size_t actual;
510 int cmd_sz, ret; 510 int cmd_sz, ret;
511 511
512 DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", 512 pr_debug("%s: %s %s 0x%08x, len %zd\n",
513 dev_name(&flash->spi->dev), __func__, "to", 513 dev_name(&flash->spi->dev), __func__, "to",
514 (u32)to, len); 514 (u32)to, len);
515 515
@@ -787,7 +787,7 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi)
787 */ 787 */
788 tmp = spi_write_then_read(spi, &code, 1, id, 5); 788 tmp = spi_write_then_read(spi, &code, 1, id, 5);
789 if (tmp < 0) { 789 if (tmp < 0) {
790 DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", 790 pr_debug("%s: error %d reading JEDEC ID\n",
791 dev_name(&spi->dev), tmp); 791 dev_name(&spi->dev), tmp);
792 return ERR_PTR(tmp); 792 return ERR_PTR(tmp);
793 } 793 }
@@ -944,8 +944,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
944 dev_info(&spi->dev, "%s (%lld Kbytes)\n", id->name, 944 dev_info(&spi->dev, "%s (%lld Kbytes)\n", id->name,
945 (long long)flash->mtd.size >> 10); 945 (long long)flash->mtd.size >> 10);
946 946
947 DEBUG(MTD_DEBUG_LEVEL2, 947 pr_debug("mtd .name = %s, .size = 0x%llx (%lldMiB) "
948 "mtd .name = %s, .size = 0x%llx (%lldMiB) "
949 ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n", 948 ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n",
950 flash->mtd.name, 949 flash->mtd.name,
951 (long long)flash->mtd.size, (long long)(flash->mtd.size >> 20), 950 (long long)flash->mtd.size, (long long)(flash->mtd.size >> 20),
@@ -954,8 +953,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
954 953
955 if (flash->mtd.numeraseregions) 954 if (flash->mtd.numeraseregions)
956 for (i = 0; i < flash->mtd.numeraseregions; i++) 955 for (i = 0; i < flash->mtd.numeraseregions; i++)
957 DEBUG(MTD_DEBUG_LEVEL2, 956 pr_debug("mtd.eraseregions[%d] = { .offset = 0x%llx, "
958 "mtd.eraseregions[%d] = { .offset = 0x%llx, "
959 ".erasesize = 0x%.8x (%uKiB), " 957 ".erasesize = 0x%.8x (%uKiB), "
960 ".numblocks = %d }\n", 958 ".numblocks = %d }\n",
961 i, (long long)flash->mtd.eraseregions[i].offset, 959 i, (long long)flash->mtd.eraseregions[i].offset,
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index c86fa573c303..f409aef58ed2 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -133,7 +133,7 @@ static int dataflash_waitready(struct spi_device *spi)
133 for (;;) { 133 for (;;) {
134 status = dataflash_status(spi); 134 status = dataflash_status(spi);
135 if (status < 0) { 135 if (status < 0) {
136 DEBUG(MTD_DEBUG_LEVEL1, "%s: status %d?\n", 136 pr_debug("%s: status %d?\n",
137 dev_name(&spi->dev), status); 137 dev_name(&spi->dev), status);
138 status = 0; 138 status = 0;
139 } 139 }
@@ -160,7 +160,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
160 uint8_t *command; 160 uint8_t *command;
161 uint32_t rem; 161 uint32_t rem;
162 162
163 DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%llx len 0x%llx\n", 163 pr_debug("%s: erase addr=0x%llx len 0x%llx\n",
164 dev_name(&spi->dev), (long long)instr->addr, 164 dev_name(&spi->dev), (long long)instr->addr,
165 (long long)instr->len); 165 (long long)instr->len);
166 166
@@ -198,7 +198,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
198 command[2] = (uint8_t)(pageaddr >> 8); 198 command[2] = (uint8_t)(pageaddr >> 8);
199 command[3] = 0; 199 command[3] = 0;
200 200
201 DEBUG(MTD_DEBUG_LEVEL3, "ERASE %s: (%x) %x %x %x [%i]\n", 201 pr_debug("ERASE %s: (%x) %x %x %x [%i]\n",
202 do_block ? "block" : "page", 202 do_block ? "block" : "page",
203 command[0], command[1], command[2], command[3], 203 command[0], command[1], command[2], command[3],
204 pageaddr); 204 pageaddr);
@@ -249,7 +249,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
249 uint8_t *command; 249 uint8_t *command;
250 int status; 250 int status;
251 251
252 DEBUG(MTD_DEBUG_LEVEL2, "%s: read 0x%x..0x%x\n", 252 pr_debug("%s: read 0x%x..0x%x\n",
253 dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); 253 dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len));
254 254
255 *retlen = 0; 255 *retlen = 0;
@@ -266,7 +266,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
266 266
267 command = priv->command; 267 command = priv->command;
268 268
269 DEBUG(MTD_DEBUG_LEVEL3, "READ: (%x) %x %x %x\n", 269 pr_debug("READ: (%x) %x %x %x\n",
270 command[0], command[1], command[2], command[3]); 270 command[0], command[1], command[2], command[3]);
271 271
272 spi_message_init(&msg); 272 spi_message_init(&msg);
@@ -298,7 +298,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
298 *retlen = msg.actual_length - 8; 298 *retlen = msg.actual_length - 8;
299 status = 0; 299 status = 0;
300 } else 300 } else
301 DEBUG(MTD_DEBUG_LEVEL1, "%s: read %x..%x --> %d\n", 301 pr_debug("%s: read %x..%x --> %d\n",
302 dev_name(&priv->spi->dev), 302 dev_name(&priv->spi->dev),
303 (unsigned)from, (unsigned)(from + len), 303 (unsigned)from, (unsigned)(from + len),
304 status); 304 status);
@@ -325,7 +325,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
325 int status = -EINVAL; 325 int status = -EINVAL;
326 uint8_t *command; 326 uint8_t *command;
327 327
328 DEBUG(MTD_DEBUG_LEVEL2, "%s: write 0x%x..0x%x\n", 328 pr_debug("%s: write 0x%x..0x%x\n",
329 dev_name(&spi->dev), (unsigned)to, (unsigned)(to + len)); 329 dev_name(&spi->dev), (unsigned)to, (unsigned)(to + len));
330 330
331 *retlen = 0; 331 *retlen = 0;
@@ -351,7 +351,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
351 351
352 mutex_lock(&priv->lock); 352 mutex_lock(&priv->lock);
353 while (remaining > 0) { 353 while (remaining > 0) {
354 DEBUG(MTD_DEBUG_LEVEL3, "write @ %i:%i len=%i\n", 354 pr_debug("write @ %i:%i len=%i\n",
355 pageaddr, offset, writelen); 355 pageaddr, offset, writelen);
356 356
357 /* REVISIT: 357 /* REVISIT:
@@ -379,12 +379,12 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
379 command[2] = (addr & 0x0000FF00) >> 8; 379 command[2] = (addr & 0x0000FF00) >> 8;
380 command[3] = 0; 380 command[3] = 0;
381 381
382 DEBUG(MTD_DEBUG_LEVEL3, "TRANSFER: (%x) %x %x %x\n", 382 pr_debug("TRANSFER: (%x) %x %x %x\n",
383 command[0], command[1], command[2], command[3]); 383 command[0], command[1], command[2], command[3]);
384 384
385 status = spi_sync(spi, &msg); 385 status = spi_sync(spi, &msg);
386 if (status < 0) 386 if (status < 0)
387 DEBUG(MTD_DEBUG_LEVEL1, "%s: xfer %u -> %d \n", 387 pr_debug("%s: xfer %u -> %d \n",
388 dev_name(&spi->dev), addr, status); 388 dev_name(&spi->dev), addr, status);
389 389
390 (void) dataflash_waitready(priv->spi); 390 (void) dataflash_waitready(priv->spi);
@@ -397,7 +397,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
397 command[2] = (addr & 0x0000FF00) >> 8; 397 command[2] = (addr & 0x0000FF00) >> 8;
398 command[3] = (addr & 0x000000FF); 398 command[3] = (addr & 0x000000FF);
399 399
400 DEBUG(MTD_DEBUG_LEVEL3, "PROGRAM: (%x) %x %x %x\n", 400 pr_debug("PROGRAM: (%x) %x %x %x\n",
401 command[0], command[1], command[2], command[3]); 401 command[0], command[1], command[2], command[3]);
402 402
403 x[1].tx_buf = writebuf; 403 x[1].tx_buf = writebuf;
@@ -406,7 +406,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
406 status = spi_sync(spi, &msg); 406 status = spi_sync(spi, &msg);
407 spi_transfer_del(x + 1); 407 spi_transfer_del(x + 1);
408 if (status < 0) 408 if (status < 0)
409 DEBUG(MTD_DEBUG_LEVEL1, "%s: pgm %u/%u -> %d \n", 409 pr_debug("%s: pgm %u/%u -> %d \n",
410 dev_name(&spi->dev), addr, writelen, status); 410 dev_name(&spi->dev), addr, writelen, status);
411 411
412 (void) dataflash_waitready(priv->spi); 412 (void) dataflash_waitready(priv->spi);
@@ -421,12 +421,12 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
421 command[2] = (addr & 0x0000FF00) >> 8; 421 command[2] = (addr & 0x0000FF00) >> 8;
422 command[3] = 0; 422 command[3] = 0;
423 423
424 DEBUG(MTD_DEBUG_LEVEL3, "COMPARE: (%x) %x %x %x\n", 424 pr_debug("COMPARE: (%x) %x %x %x\n",
425 command[0], command[1], command[2], command[3]); 425 command[0], command[1], command[2], command[3]);
426 426
427 status = spi_sync(spi, &msg); 427 status = spi_sync(spi, &msg);
428 if (status < 0) 428 if (status < 0)
429 DEBUG(MTD_DEBUG_LEVEL1, "%s: compare %u -> %d \n", 429 pr_debug("%s: compare %u -> %d \n",
430 dev_name(&spi->dev), addr, status); 430 dev_name(&spi->dev), addr, status);
431 431
432 status = dataflash_waitready(priv->spi); 432 status = dataflash_waitready(priv->spi);
@@ -780,7 +780,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
780 */ 780 */
781 tmp = spi_write_then_read(spi, &code, 1, id, 3); 781 tmp = spi_write_then_read(spi, &code, 1, id, 3);
782 if (tmp < 0) { 782 if (tmp < 0) {
783 DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", 783 pr_debug("%s: error %d reading JEDEC ID\n",
784 dev_name(&spi->dev), tmp); 784 dev_name(&spi->dev), tmp);
785 return ERR_PTR(tmp); 785 return ERR_PTR(tmp);
786 } 786 }
@@ -797,7 +797,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
797 tmp < ARRAY_SIZE(dataflash_data); 797 tmp < ARRAY_SIZE(dataflash_data);
798 tmp++, info++) { 798 tmp++, info++) {
799 if (info->jedec_id == jedec) { 799 if (info->jedec_id == jedec) {
800 DEBUG(MTD_DEBUG_LEVEL1, "%s: OTP, sector protect%s\n", 800 pr_debug("%s: OTP, sector protect%s\n",
801 dev_name(&spi->dev), 801 dev_name(&spi->dev),
802 (info->flags & SUP_POW2PS) 802 (info->flags & SUP_POW2PS)
803 ? ", binary pagesize" : "" 803 ? ", binary pagesize" : ""
@@ -805,8 +805,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
805 if (info->flags & SUP_POW2PS) { 805 if (info->flags & SUP_POW2PS) {
806 status = dataflash_status(spi); 806 status = dataflash_status(spi);
807 if (status < 0) { 807 if (status < 0) {
808 DEBUG(MTD_DEBUG_LEVEL1, 808 pr_debug("%s: status error %d\n",
809 "%s: status error %d\n",
810 dev_name(&spi->dev), status); 809 dev_name(&spi->dev), status);
811 return ERR_PTR(status); 810 return ERR_PTR(status);
812 } 811 }
@@ -871,7 +870,7 @@ static int __devinit dataflash_probe(struct spi_device *spi)
871 */ 870 */
872 status = dataflash_status(spi); 871 status = dataflash_status(spi);
873 if (status <= 0 || status == 0xff) { 872 if (status <= 0 || status == 0xff) {
874 DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n", 873 pr_debug("%s: status error %d\n",
875 dev_name(&spi->dev), status); 874 dev_name(&spi->dev), status);
876 if (status == 0 || status == 0xff) 875 if (status == 0 || status == 0xff)
877 status = -ENODEV; 876 status = -ENODEV;
@@ -907,13 +906,13 @@ static int __devinit dataflash_probe(struct spi_device *spi)
907 break; 906 break;
908 /* obsolete AT45DB1282 not (yet?) supported */ 907 /* obsolete AT45DB1282 not (yet?) supported */
909 default: 908 default:
910 DEBUG(MTD_DEBUG_LEVEL1, "%s: unsupported device (%x)\n", 909 pr_debug("%s: unsupported device (%x)\n",
911 dev_name(&spi->dev), status & 0x3c); 910 dev_name(&spi->dev), status & 0x3c);
912 status = -ENODEV; 911 status = -ENODEV;
913 } 912 }
914 913
915 if (status < 0) 914 if (status < 0)
916 DEBUG(MTD_DEBUG_LEVEL1, "%s: add_dataflash --> %d\n", 915 pr_debug("%s: add_dataflash --> %d\n",
917 dev_name(&spi->dev), status); 916 dev_name(&spi->dev), status);
918 917
919 return status; 918 return status;
@@ -924,7 +923,7 @@ static int __devexit dataflash_remove(struct spi_device *spi)
924 struct dataflash *flash = dev_get_drvdata(&spi->dev); 923 struct dataflash *flash = dev_get_drvdata(&spi->dev);
925 int status; 924 int status;
926 925
927 DEBUG(MTD_DEBUG_LEVEL1, "%s: remove\n", dev_name(&spi->dev)); 926 pr_debug("%s: remove\n", dev_name(&spi->dev));
928 927
929 status = mtd_device_unregister(&flash->mtd); 928 status = mtd_device_unregister(&flash->mtd);
930 if (status == 0) { 929 if (status == 0) {
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 44a8b408ed7b..d38ef3bffe8d 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -410,8 +410,7 @@ static int __devinit sst25l_probe(struct spi_device *spi)
410 dev_info(&spi->dev, "%s (%lld KiB)\n", flash_info->name, 410 dev_info(&spi->dev, "%s (%lld KiB)\n", flash_info->name,
411 (long long)flash->mtd.size >> 10); 411 (long long)flash->mtd.size >> 10);
412 412
413 DEBUG(MTD_DEBUG_LEVEL2, 413 pr_debug("mtd .name = %s, .size = 0x%llx (%lldMiB) "
414 "mtd .name = %s, .size = 0x%llx (%lldMiB) "
415 ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n", 414 ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n",
416 flash->mtd.name, 415 flash->mtd.name,
417 (long long)flash->mtd.size, (long long)(flash->mtd.size >> 20), 416 (long long)flash->mtd.size, (long long)(flash->mtd.size >> 20),