diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-12-23 05:00:14 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-12-23 05:00:14 -0500 |
commit | 160bbab3000dafccbe43688e48208cecf4deb879 (patch) | |
tree | 64e978ecc07d9d1f1a1345db40fc50e818321d57 /drivers/mtd/devices/mtd_dataflash.c | |
parent | d85316ac459f1cdd14ea1828eebeac1f1028e167 (diff) |
[MTD] struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/devices/mtd_dataflash.c')
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 68068975940b..d44f741ae229 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
@@ -129,7 +129,7 @@ static int dataflash_waitready(struct spi_device *spi) | |||
129 | status = dataflash_status(spi); | 129 | status = dataflash_status(spi); |
130 | if (status < 0) { | 130 | if (status < 0) { |
131 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status %d?\n", | 131 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status %d?\n", |
132 | spi->dev.bus_id, status); | 132 | dev_name(&spi->dev), status); |
133 | status = 0; | 133 | status = 0; |
134 | } | 134 | } |
135 | 135 | ||
@@ -156,8 +156,8 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
156 | uint32_t rem; | 156 | uint32_t rem; |
157 | 157 | ||
158 | DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%llx len 0x%llx\n", | 158 | DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%llx len 0x%llx\n", |
159 | spi->dev.bus_id, (long long)instr->addr, | 159 | dev_name(&spi->dev), (long long)instr->addr, |
160 | (long long)instr->len); | 160 | (long long)instr->len); |
161 | 161 | ||
162 | /* Sanity checks */ | 162 | /* Sanity checks */ |
163 | if (instr->addr + instr->len > mtd->size) | 163 | if (instr->addr + instr->len > mtd->size) |
@@ -203,7 +203,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
203 | 203 | ||
204 | if (status < 0) { | 204 | if (status < 0) { |
205 | printk(KERN_ERR "%s: erase %x, err %d\n", | 205 | printk(KERN_ERR "%s: erase %x, err %d\n", |
206 | spi->dev.bus_id, pageaddr, status); | 206 | dev_name(&spi->dev), pageaddr, status); |
207 | /* REVISIT: can retry instr->retries times; or | 207 | /* REVISIT: can retry instr->retries times; or |
208 | * giveup and instr->fail_addr = instr->addr; | 208 | * giveup and instr->fail_addr = instr->addr; |
209 | */ | 209 | */ |
@@ -245,7 +245,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
245 | int status; | 245 | int status; |
246 | 246 | ||
247 | DEBUG(MTD_DEBUG_LEVEL2, "%s: read 0x%x..0x%x\n", | 247 | DEBUG(MTD_DEBUG_LEVEL2, "%s: read 0x%x..0x%x\n", |
248 | priv->spi->dev.bus_id, (unsigned)from, (unsigned)(from + len)); | 248 | dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); |
249 | 249 | ||
250 | *retlen = 0; | 250 | *retlen = 0; |
251 | 251 | ||
@@ -294,7 +294,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
294 | status = 0; | 294 | status = 0; |
295 | } else | 295 | } else |
296 | DEBUG(MTD_DEBUG_LEVEL1, "%s: read %x..%x --> %d\n", | 296 | DEBUG(MTD_DEBUG_LEVEL1, "%s: read %x..%x --> %d\n", |
297 | priv->spi->dev.bus_id, | 297 | dev_name(&priv->spi->dev), |
298 | (unsigned)from, (unsigned)(from + len), | 298 | (unsigned)from, (unsigned)(from + len), |
299 | status); | 299 | status); |
300 | return status; | 300 | return status; |
@@ -321,7 +321,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
321 | uint8_t *command; | 321 | uint8_t *command; |
322 | 322 | ||
323 | DEBUG(MTD_DEBUG_LEVEL2, "%s: write 0x%x..0x%x\n", | 323 | DEBUG(MTD_DEBUG_LEVEL2, "%s: write 0x%x..0x%x\n", |
324 | spi->dev.bus_id, (unsigned)to, (unsigned)(to + len)); | 324 | dev_name(&spi->dev), (unsigned)to, (unsigned)(to + len)); |
325 | 325 | ||
326 | *retlen = 0; | 326 | *retlen = 0; |
327 | 327 | ||
@@ -380,7 +380,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
380 | status = spi_sync(spi, &msg); | 380 | status = spi_sync(spi, &msg); |
381 | if (status < 0) | 381 | if (status < 0) |
382 | DEBUG(MTD_DEBUG_LEVEL1, "%s: xfer %u -> %d \n", | 382 | DEBUG(MTD_DEBUG_LEVEL1, "%s: xfer %u -> %d \n", |
383 | spi->dev.bus_id, addr, status); | 383 | dev_name(&spi->dev), addr, status); |
384 | 384 | ||
385 | (void) dataflash_waitready(priv->spi); | 385 | (void) dataflash_waitready(priv->spi); |
386 | } | 386 | } |
@@ -402,7 +402,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
402 | spi_transfer_del(x + 1); | 402 | spi_transfer_del(x + 1); |
403 | if (status < 0) | 403 | if (status < 0) |
404 | DEBUG(MTD_DEBUG_LEVEL1, "%s: pgm %u/%u -> %d \n", | 404 | DEBUG(MTD_DEBUG_LEVEL1, "%s: pgm %u/%u -> %d \n", |
405 | spi->dev.bus_id, addr, writelen, status); | 405 | dev_name(&spi->dev), addr, writelen, status); |
406 | 406 | ||
407 | (void) dataflash_waitready(priv->spi); | 407 | (void) dataflash_waitready(priv->spi); |
408 | 408 | ||
@@ -422,14 +422,14 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
422 | status = spi_sync(spi, &msg); | 422 | status = spi_sync(spi, &msg); |
423 | if (status < 0) | 423 | if (status < 0) |
424 | DEBUG(MTD_DEBUG_LEVEL1, "%s: compare %u -> %d \n", | 424 | DEBUG(MTD_DEBUG_LEVEL1, "%s: compare %u -> %d \n", |
425 | spi->dev.bus_id, addr, status); | 425 | dev_name(&spi->dev), addr, status); |
426 | 426 | ||
427 | status = dataflash_waitready(priv->spi); | 427 | status = dataflash_waitready(priv->spi); |
428 | 428 | ||
429 | /* Check result of the compare operation */ | 429 | /* Check result of the compare operation */ |
430 | if (status & (1 << 6)) { | 430 | if (status & (1 << 6)) { |
431 | printk(KERN_ERR "%s: compare page %u, err %d\n", | 431 | printk(KERN_ERR "%s: compare page %u, err %d\n", |
432 | spi->dev.bus_id, pageaddr, status); | 432 | dev_name(&spi->dev), pageaddr, status); |
433 | remaining = 0; | 433 | remaining = 0; |
434 | status = -EIO; | 434 | status = -EIO; |
435 | break; | 435 | break; |
@@ -785,7 +785,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi) | |||
785 | tmp = spi_write_then_read(spi, &code, 1, id, 3); | 785 | tmp = spi_write_then_read(spi, &code, 1, id, 3); |
786 | if (tmp < 0) { | 786 | if (tmp < 0) { |
787 | DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", | 787 | DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", |
788 | spi->dev.bus_id, tmp); | 788 | dev_name(&spi->dev), tmp); |
789 | return ERR_PTR(tmp); | 789 | return ERR_PTR(tmp); |
790 | } | 790 | } |
791 | if (id[0] != 0x1f) | 791 | if (id[0] != 0x1f) |
@@ -875,7 +875,7 @@ static int __devinit dataflash_probe(struct spi_device *spi) | |||
875 | status = dataflash_status(spi); | 875 | status = dataflash_status(spi); |
876 | if (status <= 0 || status == 0xff) { | 876 | if (status <= 0 || status == 0xff) { |
877 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n", | 877 | DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n", |
878 | spi->dev.bus_id, status); | 878 | dev_name(&spi->dev), status); |
879 | if (status == 0 || status == 0xff) | 879 | if (status == 0 || status == 0xff) |
880 | status = -ENODEV; | 880 | status = -ENODEV; |
881 | return status; | 881 | return status; |
@@ -911,13 +911,13 @@ static int __devinit dataflash_probe(struct spi_device *spi) | |||
911 | /* obsolete AT45DB1282 not (yet?) supported */ | 911 | /* obsolete AT45DB1282 not (yet?) supported */ |
912 | default: | 912 | default: |
913 | DEBUG(MTD_DEBUG_LEVEL1, "%s: unsupported device (%x)\n", | 913 | DEBUG(MTD_DEBUG_LEVEL1, "%s: unsupported device (%x)\n", |
914 | spi->dev.bus_id, status & 0x3c); | 914 | dev_name(&spi->dev), status & 0x3c); |
915 | status = -ENODEV; | 915 | status = -ENODEV; |
916 | } | 916 | } |
917 | 917 | ||
918 | if (status < 0) | 918 | if (status < 0) |
919 | DEBUG(MTD_DEBUG_LEVEL1, "%s: add_dataflash --> %d\n", | 919 | DEBUG(MTD_DEBUG_LEVEL1, "%s: add_dataflash --> %d\n", |
920 | spi->dev.bus_id, status); | 920 | dev_name(&spi->dev), status); |
921 | 921 | ||
922 | return status; | 922 | return status; |
923 | } | 923 | } |
@@ -927,7 +927,7 @@ static int __devexit dataflash_remove(struct spi_device *spi) | |||
927 | struct dataflash *flash = dev_get_drvdata(&spi->dev); | 927 | struct dataflash *flash = dev_get_drvdata(&spi->dev); |
928 | int status; | 928 | int status; |
929 | 929 | ||
930 | DEBUG(MTD_DEBUG_LEVEL1, "%s: remove\n", spi->dev.bus_id); | 930 | DEBUG(MTD_DEBUG_LEVEL1, "%s: remove\n", dev_name(&spi->dev)); |
931 | 931 | ||
932 | if (mtd_has_partitions() && flash->partitioned) | 932 | if (mtd_has_partitions() && flash->partitioned) |
933 | status = del_mtd_partitions(&flash->mtd); | 933 | status = del_mtd_partitions(&flash->mtd); |