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 | |
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')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 20 | ||||
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 32 | ||||
-rw-r--r-- | drivers/mtd/maps/integrator-flash.c | 2 | ||||
-rw-r--r-- | drivers/mtd/maps/ixp2000.c | 4 | ||||
-rw-r--r-- | drivers/mtd/maps/ixp4xx.c | 2 | ||||
-rw-r--r-- | drivers/mtd/maps/omap_nor.c | 2 | ||||
-rw-r--r-- | drivers/mtd/maps/physmap.c | 6 | ||||
-rw-r--r-- | drivers/mtd/maps/physmap_of.c | 4 | ||||
-rw-r--r-- | drivers/mtd/mtdconcat.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/fsl_upm.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/plat_nand.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/tmio_nand.c | 2 | ||||
-rw-r--r-- | drivers/mtd/onenand/generic.c | 2 | ||||
-rw-r--r-- | drivers/mtd/onenand/omap2.c | 2 | ||||
-rw-r--r-- | drivers/mtd/ubi/build.c | 2 | ||||
-rw-r--r-- | drivers/mtd/ubi/vmt.c | 4 |
16 files changed, 45 insertions, 45 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; |
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); |
diff --git a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c index 7100ee3c7b01..d2ec262666c7 100644 --- a/drivers/mtd/maps/integrator-flash.c +++ b/drivers/mtd/maps/integrator-flash.c | |||
@@ -105,7 +105,7 @@ static int armflash_probe(struct platform_device *dev) | |||
105 | info->map.bankwidth = plat->width; | 105 | info->map.bankwidth = plat->width; |
106 | info->map.phys = res->start; | 106 | info->map.phys = res->start; |
107 | info->map.virt = base; | 107 | info->map.virt = base; |
108 | info->map.name = dev->dev.bus_id; | 108 | info->map.name = dev_name(&dev->dev); |
109 | info->map.set_vpp = armflash_set_vpp; | 109 | info->map.set_vpp = armflash_set_vpp; |
110 | 110 | ||
111 | simple_map_init(&info->map); | 111 | simple_map_init(&info->map); |
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c index dcdb1f17577d..d76880d91bdb 100644 --- a/drivers/mtd/maps/ixp2000.c +++ b/drivers/mtd/maps/ixp2000.c | |||
@@ -188,7 +188,7 @@ static int ixp2000_flash_probe(struct platform_device *dev) | |||
188 | */ | 188 | */ |
189 | info->map.map_priv_2 = (unsigned long) ixp_data->bank_setup; | 189 | info->map.map_priv_2 = (unsigned long) ixp_data->bank_setup; |
190 | 190 | ||
191 | info->map.name = dev->dev.bus_id; | 191 | info->map.name = dev_name(&dev->dev); |
192 | info->map.read = ixp2000_flash_read8; | 192 | info->map.read = ixp2000_flash_read8; |
193 | info->map.write = ixp2000_flash_write8; | 193 | info->map.write = ixp2000_flash_write8; |
194 | info->map.copy_from = ixp2000_flash_copy_from; | 194 | info->map.copy_from = ixp2000_flash_copy_from; |
@@ -196,7 +196,7 @@ static int ixp2000_flash_probe(struct platform_device *dev) | |||
196 | 196 | ||
197 | info->res = request_mem_region(dev->resource->start, | 197 | info->res = request_mem_region(dev->resource->start, |
198 | dev->resource->end - dev->resource->start + 1, | 198 | dev->resource->end - dev->resource->start + 1, |
199 | dev->dev.bus_id); | 199 | dev_name(&dev->dev)); |
200 | if (!info->res) { | 200 | if (!info->res) { |
201 | dev_err(&dev->dev, "Could not reserve memory region\n"); | 201 | dev_err(&dev->dev, "Could not reserve memory region\n"); |
202 | err = -ENOMEM; | 202 | err = -ENOMEM; |
diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index 9c7a5fbd4e51..4d0be2f1503f 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c | |||
@@ -218,7 +218,7 @@ static int ixp4xx_flash_probe(struct platform_device *dev) | |||
218 | * handle that. | 218 | * handle that. |
219 | */ | 219 | */ |
220 | info->map.bankwidth = 2; | 220 | info->map.bankwidth = 2; |
221 | info->map.name = dev->dev.bus_id; | 221 | info->map.name = dev_name(&dev->dev); |
222 | info->map.read = ixp4xx_read16, | 222 | info->map.read = ixp4xx_read16, |
223 | info->map.write = ixp4xx_probe_write16, | 223 | info->map.write = ixp4xx_probe_write16, |
224 | info->map.copy_from = ixp4xx_copy_from, | 224 | info->map.copy_from = ixp4xx_copy_from, |
diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c index 05f276af15da..7e50e9b1b781 100644 --- a/drivers/mtd/maps/omap_nor.c +++ b/drivers/mtd/maps/omap_nor.c | |||
@@ -101,7 +101,7 @@ static int __init omapflash_probe(struct platform_device *pdev) | |||
101 | err = -ENOMEM; | 101 | err = -ENOMEM; |
102 | goto out_release_mem_region; | 102 | goto out_release_mem_region; |
103 | } | 103 | } |
104 | info->map.name = pdev->dev.bus_id; | 104 | info->map.name = dev_name(&pdev->dev); |
105 | info->map.phys = res->start; | 105 | info->map.phys = res->start; |
106 | info->map.size = size; | 106 | info->map.size = size; |
107 | info->map.bankwidth = pdata->width; | 107 | info->map.bankwidth = pdata->width; |
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index 58207b3b9411..d3a2acc7e9be 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c | |||
@@ -106,13 +106,13 @@ static int physmap_flash_probe(struct platform_device *dev) | |||
106 | if (!devm_request_mem_region(&dev->dev, | 106 | if (!devm_request_mem_region(&dev->dev, |
107 | dev->resource[i].start, | 107 | dev->resource[i].start, |
108 | dev->resource[i].end - dev->resource[i].start + 1, | 108 | dev->resource[i].end - dev->resource[i].start + 1, |
109 | dev->dev.bus_id)) { | 109 | dev_name(&dev->dev))) { |
110 | dev_err(&dev->dev, "Could not reserve memory region\n"); | 110 | dev_err(&dev->dev, "Could not reserve memory region\n"); |
111 | err = -ENOMEM; | 111 | err = -ENOMEM; |
112 | goto err_out; | 112 | goto err_out; |
113 | } | 113 | } |
114 | 114 | ||
115 | info->map[i].name = dev->dev.bus_id; | 115 | info->map[i].name = dev_name(&dev->dev); |
116 | info->map[i].phys = dev->resource[i].start; | 116 | info->map[i].phys = dev->resource[i].start; |
117 | info->map[i].size = dev->resource[i].end - dev->resource[i].start + 1; | 117 | info->map[i].size = dev->resource[i].end - dev->resource[i].start + 1; |
118 | info->map[i].bankwidth = physmap_data->width; | 118 | info->map[i].bankwidth = physmap_data->width; |
@@ -148,7 +148,7 @@ static int physmap_flash_probe(struct platform_device *dev) | |||
148 | * We detected multiple devices. Concatenate them together. | 148 | * We detected multiple devices. Concatenate them together. |
149 | */ | 149 | */ |
150 | #ifdef CONFIG_MTD_CONCAT | 150 | #ifdef CONFIG_MTD_CONCAT |
151 | info->cmtd = mtd_concat_create(info->mtd, devices_found, dev->dev.bus_id); | 151 | info->cmtd = mtd_concat_create(info->mtd, devices_found, dev_name(&dev->dev)); |
152 | if (info->cmtd == NULL) | 152 | if (info->cmtd == NULL) |
153 | err = -ENXIO; | 153 | err = -ENXIO; |
154 | #else | 154 | #else |
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 5fcfec034a94..fbf0ca939d72 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -183,7 +183,7 @@ static int __devinit of_flash_probe(struct of_device *dev, | |||
183 | 183 | ||
184 | err = -EBUSY; | 184 | err = -EBUSY; |
185 | info->res = request_mem_region(res.start, res.end - res.start + 1, | 185 | info->res = request_mem_region(res.start, res.end - res.start + 1, |
186 | dev->dev.bus_id); | 186 | dev_name(&dev->dev)); |
187 | if (!info->res) | 187 | if (!info->res) |
188 | goto err_out; | 188 | goto err_out; |
189 | 189 | ||
@@ -194,7 +194,7 @@ static int __devinit of_flash_probe(struct of_device *dev, | |||
194 | goto err_out; | 194 | goto err_out; |
195 | } | 195 | } |
196 | 196 | ||
197 | info->map.name = dev->dev.bus_id; | 197 | info->map.name = dev_name(&dev->dev); |
198 | info->map.phys = res.start; | 198 | info->map.phys = res.start; |
199 | info->map.size = res.end - res.start + 1; | 199 | info->map.size = res.end - res.start + 1; |
200 | info->map.bankwidth = *width; | 200 | info->map.bankwidth = *width; |
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index c26dd528d094..3dbb1b38db66 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c | |||
@@ -691,7 +691,7 @@ static int concat_block_markbad(struct mtd_info *mtd, loff_t ofs) | |||
691 | */ | 691 | */ |
692 | struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to concatenate */ | 692 | struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to concatenate */ |
693 | int num_devs, /* number of subdevices */ | 693 | int num_devs, /* number of subdevices */ |
694 | char *name) | 694 | const char *name) |
695 | { /* name for the new device */ | 695 | { /* name for the new device */ |
696 | int i; | 696 | int i; |
697 | size_t size; | 697 | size_t size; |
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index a83192f80eba..7815a404a632 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c | |||
@@ -222,7 +222,7 @@ static int __devinit fun_probe(struct of_device *ofdev, | |||
222 | 222 | ||
223 | fun->rnb_gpio = of_get_gpio(ofdev->node, 0); | 223 | fun->rnb_gpio = of_get_gpio(ofdev->node, 0); |
224 | if (fun->rnb_gpio >= 0) { | 224 | if (fun->rnb_gpio >= 0) { |
225 | ret = gpio_request(fun->rnb_gpio, ofdev->dev.bus_id); | 225 | ret = gpio_request(fun->rnb_gpio, dev_name(&ofdev->dev)); |
226 | if (ret) { | 226 | if (ret) { |
227 | dev_err(&ofdev->dev, "can't request RNB gpio\n"); | 227 | dev_err(&ofdev->dev, "can't request RNB gpio\n"); |
228 | goto err2; | 228 | goto err2; |
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c index f674c5427b17..75f9f4874ecf 100644 --- a/drivers/mtd/nand/plat_nand.c +++ b/drivers/mtd/nand/plat_nand.c | |||
@@ -54,7 +54,7 @@ static int __init plat_nand_probe(struct platform_device *pdev) | |||
54 | data->chip.priv = &data; | 54 | data->chip.priv = &data; |
55 | data->mtd.priv = &data->chip; | 55 | data->mtd.priv = &data->chip; |
56 | data->mtd.owner = THIS_MODULE; | 56 | data->mtd.owner = THIS_MODULE; |
57 | data->mtd.name = pdev->dev.bus_id; | 57 | data->mtd.name = dev_name(&pdev->dev); |
58 | 58 | ||
59 | data->chip.IO_ADDR_R = data->io_base; | 59 | data->chip.IO_ADDR_R = data->io_base; |
60 | data->chip.IO_ADDR_W = data->io_base; | 60 | data->chip.IO_ADDR_W = data->io_base; |
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c index edb1e322113d..daa6a4c3b8ce 100644 --- a/drivers/mtd/nand/tmio_nand.c +++ b/drivers/mtd/nand/tmio_nand.c | |||
@@ -433,7 +433,7 @@ static int tmio_probe(struct platform_device *dev) | |||
433 | nand_chip->chip_delay = 15; | 433 | nand_chip->chip_delay = 15; |
434 | 434 | ||
435 | retval = request_irq(irq, &tmio_irq, | 435 | retval = request_irq(irq, &tmio_irq, |
436 | IRQF_DISABLED, dev->dev.bus_id, tmio); | 436 | IRQF_DISABLED, dev_name(&dev->dev), tmio); |
437 | if (retval) { | 437 | if (retval) { |
438 | dev_err(&dev->dev, "request_irq error %d\n", retval); | 438 | dev_err(&dev->dev, "request_irq error %d\n", retval); |
439 | goto err_irq; | 439 | goto err_irq; |
diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c index ad81ab8e95e2..5b69e7773c6c 100644 --- a/drivers/mtd/onenand/generic.c +++ b/drivers/mtd/onenand/generic.c | |||
@@ -63,7 +63,7 @@ static int __devinit generic_onenand_probe(struct device *dev) | |||
63 | info->onenand.mmcontrol = pdata->mmcontrol; | 63 | info->onenand.mmcontrol = pdata->mmcontrol; |
64 | info->onenand.irq = platform_get_irq(pdev, 0); | 64 | info->onenand.irq = platform_get_irq(pdev, 0); |
65 | 65 | ||
66 | info->mtd.name = pdev->dev.bus_id; | 66 | info->mtd.name = dev_name(&pdev->dev); |
67 | info->mtd.priv = &info->onenand; | 67 | info->mtd.priv = &info->onenand; |
68 | info->mtd.owner = THIS_MODULE; | 68 | info->mtd.owner = THIS_MODULE; |
69 | 69 | ||
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index a7e4d985f5ef..710edee790b5 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c | |||
@@ -668,7 +668,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev) | |||
668 | c->onenand.base); | 668 | c->onenand.base); |
669 | 669 | ||
670 | c->pdev = pdev; | 670 | c->pdev = pdev; |
671 | c->mtd.name = pdev->dev.bus_id; | 671 | c->mtd.name = dev_name(&pdev->dev); |
672 | c->mtd.priv = &c->onenand; | 672 | c->mtd.priv = &c->onenand; |
673 | c->mtd.owner = THIS_MODULE; | 673 | c->mtd.owner = THIS_MODULE; |
674 | 674 | ||
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 634e2e86525f..84a134ead7cc 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c | |||
@@ -280,7 +280,7 @@ static int ubi_sysfs_init(struct ubi_device *ubi) | |||
280 | ubi->dev.release = dev_release; | 280 | ubi->dev.release = dev_release; |
281 | ubi->dev.devt = ubi->cdev.dev; | 281 | ubi->dev.devt = ubi->cdev.dev; |
282 | ubi->dev.class = ubi_class; | 282 | ubi->dev.class = ubi_class; |
283 | sprintf(&ubi->dev.bus_id[0], UBI_NAME_STR"%d", ubi->ubi_num); | 283 | dev_set_name(&ubi->dev, UBI_NAME_STR"%d", ubi->ubi_num); |
284 | err = device_register(&ubi->dev); | 284 | err = device_register(&ubi->dev); |
285 | if (err) | 285 | if (err) |
286 | return err; | 286 | return err; |
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index 3531ca9a1e24..22e1d7398fce 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c | |||
@@ -329,7 +329,7 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req) | |||
329 | vol->dev.devt = dev; | 329 | vol->dev.devt = dev; |
330 | vol->dev.class = ubi_class; | 330 | vol->dev.class = ubi_class; |
331 | 331 | ||
332 | sprintf(&vol->dev.bus_id[0], "%s_%d", ubi->ubi_name, vol->vol_id); | 332 | dev_set_name(&vol->dev, "%s_%d", ubi->ubi_name, vol->vol_id); |
333 | err = device_register(&vol->dev); | 333 | err = device_register(&vol->dev); |
334 | if (err) { | 334 | if (err) { |
335 | ubi_err("cannot register device"); | 335 | ubi_err("cannot register device"); |
@@ -678,7 +678,7 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol) | |||
678 | vol->dev.parent = &ubi->dev; | 678 | vol->dev.parent = &ubi->dev; |
679 | vol->dev.devt = dev; | 679 | vol->dev.devt = dev; |
680 | vol->dev.class = ubi_class; | 680 | vol->dev.class = ubi_class; |
681 | sprintf(&vol->dev.bus_id[0], "%s_%d", ubi->ubi_name, vol->vol_id); | 681 | dev_set_name(&vol->dev, "%s_%d", ubi->ubi_name, vol->vol_id); |
682 | err = device_register(&vol->dev); | 682 | err = device_register(&vol->dev); |
683 | if (err) | 683 | if (err) |
684 | goto out_gluebi; | 684 | goto out_gluebi; |