diff options
Diffstat (limited to 'drivers/mtd/devices/mtd_dataflash.c')
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 6dd9aff8bb2d..65126cd668ff 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
@@ -128,7 +128,7 @@ static int dataflash_waitready(struct spi_device *spi) | |||
128 | status = dataflash_status(spi); | 128 | status = dataflash_status(spi); |
129 | if (status < 0) { | 129 | if (status < 0) { |
130 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status %d?\n", | 130 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status %d?\n", |
131 | spi->dev.bus_id, status); | 131 | dev_name(&spi->dev), status); |
132 | status = 0; | 132 | status = 0; |
133 | } | 133 | } |
134 | 134 | ||
@@ -154,7 +154,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
154 | uint8_t *command; | 154 | uint8_t *command; |
155 | 155 | ||
156 | DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%x len 0x%x\n", | 156 | DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%x len 0x%x\n", |
157 | spi->dev.bus_id, | 157 | dev_name(&spi->dev), |
158 | instr->addr, instr->len); | 158 | instr->addr, instr->len); |
159 | 159 | ||
160 | /* Sanity checks */ | 160 | /* Sanity checks */ |
@@ -197,7 +197,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
197 | 197 | ||
198 | if (status < 0) { | 198 | if (status < 0) { |
199 | printk(KERN_ERR "%s: erase %x, err %d\n", | 199 | printk(KERN_ERR "%s: erase %x, err %d\n", |
200 | spi->dev.bus_id, pageaddr, status); | 200 | dev_name(&spi->dev), pageaddr, status); |
201 | /* REVISIT: can retry instr->retries times; or | 201 | /* REVISIT: can retry instr->retries times; or |
202 | * giveup and instr->fail_addr = instr->addr; | 202 | * giveup and instr->fail_addr = instr->addr; |
203 | */ | 203 | */ |
@@ -239,7 +239,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
239 | int status; | 239 | int status; |
240 | 240 | ||
241 | DEBUG(MTD_DEBUG_LEVEL2, "%s: read 0x%x..0x%x\n", | 241 | DEBUG(MTD_DEBUG_LEVEL2, "%s: read 0x%x..0x%x\n", |
242 | priv->spi->dev.bus_id, (unsigned)from, (unsigned)(from + len)); | 242 | dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); |
243 | 243 | ||
244 | *retlen = 0; | 244 | *retlen = 0; |
245 | 245 | ||
@@ -288,7 +288,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
288 | status = 0; | 288 | status = 0; |
289 | } else | 289 | } else |
290 | DEBUG(MTD_DEBUG_LEVEL1, "%s: read %x..%x --> %d\n", | 290 | DEBUG(MTD_DEBUG_LEVEL1, "%s: read %x..%x --> %d\n", |
291 | priv->spi->dev.bus_id, | 291 | dev_name(&priv->spi->dev), |
292 | (unsigned)from, (unsigned)(from + len), | 292 | (unsigned)from, (unsigned)(from + len), |
293 | status); | 293 | status); |
294 | return status; | 294 | return status; |
@@ -315,7 +315,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
315 | uint8_t *command; | 315 | uint8_t *command; |
316 | 316 | ||
317 | DEBUG(MTD_DEBUG_LEVEL2, "%s: write 0x%x..0x%x\n", | 317 | DEBUG(MTD_DEBUG_LEVEL2, "%s: write 0x%x..0x%x\n", |
318 | spi->dev.bus_id, (unsigned)to, (unsigned)(to + len)); | 318 | dev_name(&spi->dev), (unsigned)to, (unsigned)(to + len)); |
319 | 319 | ||
320 | *retlen = 0; | 320 | *retlen = 0; |
321 | 321 | ||
@@ -374,7 +374,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
374 | status = spi_sync(spi, &msg); | 374 | status = spi_sync(spi, &msg); |
375 | if (status < 0) | 375 | if (status < 0) |
376 | DEBUG(MTD_DEBUG_LEVEL1, "%s: xfer %u -> %d \n", | 376 | DEBUG(MTD_DEBUG_LEVEL1, "%s: xfer %u -> %d \n", |
377 | spi->dev.bus_id, addr, status); | 377 | dev_name(&spi->dev), addr, status); |
378 | 378 | ||
379 | (void) dataflash_waitready(priv->spi); | 379 | (void) dataflash_waitready(priv->spi); |
380 | } | 380 | } |
@@ -396,7 +396,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
396 | spi_transfer_del(x + 1); | 396 | spi_transfer_del(x + 1); |
397 | if (status < 0) | 397 | if (status < 0) |
398 | DEBUG(MTD_DEBUG_LEVEL1, "%s: pgm %u/%u -> %d \n", | 398 | DEBUG(MTD_DEBUG_LEVEL1, "%s: pgm %u/%u -> %d \n", |
399 | spi->dev.bus_id, addr, writelen, status); | 399 | dev_name(&spi->dev), addr, writelen, status); |
400 | 400 | ||
401 | (void) dataflash_waitready(priv->spi); | 401 | (void) dataflash_waitready(priv->spi); |
402 | 402 | ||
@@ -416,14 +416,14 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
416 | status = spi_sync(spi, &msg); | 416 | status = spi_sync(spi, &msg); |
417 | if (status < 0) | 417 | if (status < 0) |
418 | DEBUG(MTD_DEBUG_LEVEL1, "%s: compare %u -> %d \n", | 418 | DEBUG(MTD_DEBUG_LEVEL1, "%s: compare %u -> %d \n", |
419 | spi->dev.bus_id, addr, status); | 419 | dev_name(&spi->dev), addr, status); |
420 | 420 | ||
421 | status = dataflash_waitready(priv->spi); | 421 | status = dataflash_waitready(priv->spi); |
422 | 422 | ||
423 | /* Check result of the compare operation */ | 423 | /* Check result of the compare operation */ |
424 | if (status & (1 << 6)) { | 424 | if (status & (1 << 6)) { |
425 | printk(KERN_ERR "%s: compare page %u, err %d\n", | 425 | printk(KERN_ERR "%s: compare page %u, err %d\n", |
426 | spi->dev.bus_id, pageaddr, status); | 426 | dev_name(&spi->dev), pageaddr, status); |
427 | remaining = 0; | 427 | remaining = 0; |
428 | status = -EIO; | 428 | status = -EIO; |
429 | break; | 429 | break; |
@@ -779,7 +779,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi) | |||
779 | tmp = spi_write_then_read(spi, &code, 1, id, 3); | 779 | tmp = spi_write_then_read(spi, &code, 1, id, 3); |
780 | if (tmp < 0) { | 780 | if (tmp < 0) { |
781 | DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", | 781 | DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", |
782 | spi->dev.bus_id, tmp); | 782 | dev_name(&spi->dev), tmp); |
783 | return ERR_PTR(tmp); | 783 | return ERR_PTR(tmp); |
784 | } | 784 | } |
785 | if (id[0] != 0x1f) | 785 | if (id[0] != 0x1f) |
@@ -869,7 +869,7 @@ static int __devinit dataflash_probe(struct spi_device *spi) | |||
869 | status = dataflash_status(spi); | 869 | status = dataflash_status(spi); |
870 | if (status <= 0 || status == 0xff) { | 870 | if (status <= 0 || status == 0xff) { |
871 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n", | 871 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n", |
872 | spi->dev.bus_id, status); | 872 | dev_name(&spi->dev), status); |
873 | if (status == 0 || status == 0xff) | 873 | if (status == 0 || status == 0xff) |
874 | status = -ENODEV; | 874 | status = -ENODEV; |
875 | return status; | 875 | return status; |
@@ -905,13 +905,13 @@ static int __devinit dataflash_probe(struct spi_device *spi) | |||
905 | /* obsolete AT45DB1282 not (yet?) supported */ | 905 | /* obsolete AT45DB1282 not (yet?) supported */ |
906 | default: | 906 | default: |
907 | DEBUG(MTD_DEBUG_LEVEL1, "%s: unsupported device (%x)\n", | 907 | DEBUG(MTD_DEBUG_LEVEL1, "%s: unsupported device (%x)\n", |
908 | spi->dev.bus_id, status & 0x3c); | 908 | dev_name(&spi->dev), status & 0x3c); |
909 | status = -ENODEV; | 909 | status = -ENODEV; |
910 | } | 910 | } |
911 | 911 | ||
912 | if (status < 0) | 912 | if (status < 0) |
913 | DEBUG(MTD_DEBUG_LEVEL1, "%s: add_dataflash --> %d\n", | 913 | DEBUG(MTD_DEBUG_LEVEL1, "%s: add_dataflash --> %d\n", |
914 | spi->dev.bus_id, status); | 914 | dev_name(&spi->dev), status); |
915 | 915 | ||
916 | return status; | 916 | return status; |
917 | } | 917 | } |
@@ -921,7 +921,7 @@ static int __devexit dataflash_remove(struct spi_device *spi) | |||
921 | struct dataflash *flash = dev_get_drvdata(&spi->dev); | 921 | struct dataflash *flash = dev_get_drvdata(&spi->dev); |
922 | int status; | 922 | int status; |
923 | 923 | ||
924 | DEBUG(MTD_DEBUG_LEVEL1, "%s: remove\n", spi->dev.bus_id); | 924 | DEBUG(MTD_DEBUG_LEVEL1, "%s: remove\n", dev_name(&spi->dev)); |
925 | 925 | ||
926 | if (mtd_has_partitions() && flash->partitioned) | 926 | if (mtd_has_partitions() && flash->partitioned) |
927 | status = del_mtd_partitions(&flash->mtd); | 927 | status = del_mtd_partitions(&flash->mtd); |