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/m25p80.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/m25p80.c')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 9be0229c3d30..7c3fc766dcf1 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -171,8 +171,8 @@ static int wait_till_ready(struct m25p *flash) | |||
171 | static int erase_chip(struct m25p *flash) | 171 | static int erase_chip(struct m25p *flash) |
172 | { | 172 | { |
173 | DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %lldKiB\n", | 173 | DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %lldKiB\n", |
174 | flash->spi->dev.bus_id, __func__, | 174 | dev_name(&flash->spi->dev), __func__, |
175 | (long long)(flash->mtd.size >> 10)); | 175 | (long long)(flash->mtd.size >> 10)); |
176 | 176 | ||
177 | /* Wait until finished previous write command. */ | 177 | /* Wait until finished previous write command. */ |
178 | if (wait_till_ready(flash)) | 178 | if (wait_till_ready(flash)) |
@@ -198,7 +198,7 @@ static int erase_chip(struct m25p *flash) | |||
198 | static int erase_sector(struct m25p *flash, u32 offset) | 198 | static int erase_sector(struct m25p *flash, u32 offset) |
199 | { | 199 | { |
200 | DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB at 0x%08x\n", | 200 | DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB at 0x%08x\n", |
201 | flash->spi->dev.bus_id, __func__, | 201 | dev_name(&flash->spi->dev), __func__, |
202 | flash->mtd.erasesize / 1024, offset); | 202 | flash->mtd.erasesize / 1024, offset); |
203 | 203 | ||
204 | /* Wait until finished previous write command. */ | 204 | /* Wait until finished previous write command. */ |
@@ -236,8 +236,8 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
236 | uint32_t rem; | 236 | uint32_t rem; |
237 | 237 | ||
238 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%llx, len %lld\n", | 238 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%llx, len %lld\n", |
239 | flash->spi->dev.bus_id, __func__, "at", | 239 | dev_name(&flash->spi->dev), __func__, "at", |
240 | (long long)instr->addr, (long long)instr->len); | 240 | (long long)instr->addr, (long long)instr->len); |
241 | 241 | ||
242 | /* sanity checks */ | 242 | /* sanity checks */ |
243 | if (instr->addr + instr->len > flash->mtd.size) | 243 | if (instr->addr + instr->len > flash->mtd.size) |
@@ -296,7 +296,7 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
296 | struct spi_message m; | 296 | struct spi_message m; |
297 | 297 | ||
298 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", | 298 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", |
299 | flash->spi->dev.bus_id, __func__, "from", | 299 | dev_name(&flash->spi->dev), __func__, "from", |
300 | (u32)from, len); | 300 | (u32)from, len); |
301 | 301 | ||
302 | /* sanity checks */ | 302 | /* sanity checks */ |
@@ -368,7 +368,7 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
368 | struct spi_message m; | 368 | struct spi_message m; |
369 | 369 | ||
370 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", | 370 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", |
371 | flash->spi->dev.bus_id, __func__, "to", | 371 | dev_name(&flash->spi->dev), __func__, "to", |
372 | (u32)to, len); | 372 | (u32)to, len); |
373 | 373 | ||
374 | if (retlen) | 374 | if (retlen) |
@@ -564,7 +564,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi) | |||
564 | tmp = spi_write_then_read(spi, &code, 1, id, 5); | 564 | tmp = spi_write_then_read(spi, &code, 1, id, 5); |
565 | if (tmp < 0) { | 565 | if (tmp < 0) { |
566 | DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", | 566 | DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", |
567 | spi->dev.bus_id, tmp); | 567 | dev_name(&spi->dev), tmp); |
568 | return NULL; | 568 | return NULL; |
569 | } | 569 | } |
570 | jedec = id[0]; | 570 | jedec = id[0]; |
@@ -618,7 +618,7 @@ static int __devinit m25p_probe(struct spi_device *spi) | |||
618 | /* unrecognized chip? */ | 618 | /* unrecognized chip? */ |
619 | if (i == ARRAY_SIZE(m25p_data)) { | 619 | if (i == ARRAY_SIZE(m25p_data)) { |
620 | DEBUG(MTD_DEBUG_LEVEL0, "%s: unrecognized id %s\n", | 620 | DEBUG(MTD_DEBUG_LEVEL0, "%s: unrecognized id %s\n", |
621 | spi->dev.bus_id, data->type); | 621 | dev_name(&spi->dev), data->type); |
622 | info = NULL; | 622 | info = NULL; |
623 | 623 | ||
624 | /* recognized; is that chip really what's there? */ | 624 | /* recognized; is that chip really what's there? */ |
@@ -659,7 +659,7 @@ static int __devinit m25p_probe(struct spi_device *spi) | |||
659 | if (data && data->name) | 659 | if (data && data->name) |
660 | flash->mtd.name = data->name; | 660 | flash->mtd.name = data->name; |
661 | else | 661 | else |
662 | flash->mtd.name = spi->dev.bus_id; | 662 | flash->mtd.name = dev_name(&spi->dev); |
663 | 663 | ||
664 | flash->mtd.type = MTD_NORFLASH; | 664 | flash->mtd.type = MTD_NORFLASH; |
665 | flash->mtd.writesize = 1; | 665 | flash->mtd.writesize = 1; |