diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 16 | ||||
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 30 | ||||
-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, 42 insertions, 42 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 6659b2275c0c..5733f0643843 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -170,7 +170,7 @@ static int wait_till_ready(struct m25p *flash) | |||
170 | static int erase_chip(struct m25p *flash) | 170 | static int erase_chip(struct m25p *flash) |
171 | { | 171 | { |
172 | DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB\n", | 172 | DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB\n", |
173 | flash->spi->dev.bus_id, __func__, | 173 | dev_name(&flash->spi->dev), __func__, |
174 | flash->mtd.size / 1024); | 174 | flash->mtd.size / 1024); |
175 | 175 | ||
176 | /* Wait until finished previous write command. */ | 176 | /* Wait until finished previous write command. */ |
@@ -197,7 +197,7 @@ static int erase_chip(struct m25p *flash) | |||
197 | static int erase_sector(struct m25p *flash, u32 offset) | 197 | static int erase_sector(struct m25p *flash, u32 offset) |
198 | { | 198 | { |
199 | DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB at 0x%08x\n", | 199 | DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB at 0x%08x\n", |
200 | flash->spi->dev.bus_id, __func__, | 200 | dev_name(&flash->spi->dev), __func__, |
201 | flash->mtd.erasesize / 1024, offset); | 201 | flash->mtd.erasesize / 1024, offset); |
202 | 202 | ||
203 | /* Wait until finished previous write command. */ | 203 | /* Wait until finished previous write command. */ |
@@ -234,7 +234,7 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
234 | u32 addr,len; | 234 | u32 addr,len; |
235 | 235 | ||
236 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %d\n", | 236 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %d\n", |
237 | flash->spi->dev.bus_id, __func__, "at", | 237 | dev_name(&flash->spi->dev), __func__, "at", |
238 | (u32)instr->addr, instr->len); | 238 | (u32)instr->addr, instr->len); |
239 | 239 | ||
240 | /* sanity checks */ | 240 | /* sanity checks */ |
@@ -295,7 +295,7 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
295 | struct spi_message m; | 295 | struct spi_message m; |
296 | 296 | ||
297 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", | 297 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", |
298 | flash->spi->dev.bus_id, __func__, "from", | 298 | dev_name(&flash->spi->dev), __func__, "from", |
299 | (u32)from, len); | 299 | (u32)from, len); |
300 | 300 | ||
301 | /* sanity checks */ | 301 | /* sanity checks */ |
@@ -367,7 +367,7 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
367 | struct spi_message m; | 367 | struct spi_message m; |
368 | 368 | ||
369 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", | 369 | DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", |
370 | flash->spi->dev.bus_id, __func__, "to", | 370 | dev_name(&flash->spi->dev), __func__, "to", |
371 | (u32)to, len); | 371 | (u32)to, len); |
372 | 372 | ||
373 | if (retlen) | 373 | if (retlen) |
@@ -563,7 +563,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi) | |||
563 | tmp = spi_write_then_read(spi, &code, 1, id, 5); | 563 | tmp = spi_write_then_read(spi, &code, 1, id, 5); |
564 | if (tmp < 0) { | 564 | if (tmp < 0) { |
565 | DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", | 565 | DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", |
566 | spi->dev.bus_id, tmp); | 566 | dev_name(&spi->dev), tmp); |
567 | return NULL; | 567 | return NULL; |
568 | } | 568 | } |
569 | jedec = id[0]; | 569 | jedec = id[0]; |
@@ -617,7 +617,7 @@ static int __devinit m25p_probe(struct spi_device *spi) | |||
617 | /* unrecognized chip? */ | 617 | /* unrecognized chip? */ |
618 | if (i == ARRAY_SIZE(m25p_data)) { | 618 | if (i == ARRAY_SIZE(m25p_data)) { |
619 | DEBUG(MTD_DEBUG_LEVEL0, "%s: unrecognized id %s\n", | 619 | DEBUG(MTD_DEBUG_LEVEL0, "%s: unrecognized id %s\n", |
620 | spi->dev.bus_id, data->type); | 620 | dev_name(&spi->dev), data->type); |
621 | info = NULL; | 621 | info = NULL; |
622 | 622 | ||
623 | /* recognized; is that chip really what's there? */ | 623 | /* recognized; is that chip really what's there? */ |
@@ -658,7 +658,7 @@ static int __devinit m25p_probe(struct spi_device *spi) | |||
658 | if (data && data->name) | 658 | if (data && data->name) |
659 | flash->mtd.name = data->name; | 659 | flash->mtd.name = data->name; |
660 | else | 660 | else |
661 | flash->mtd.name = spi->dev.bus_id; | 661 | flash->mtd.name = dev_name(&spi->dev); |
662 | 662 | ||
663 | flash->mtd.type = MTD_NORFLASH; | 663 | flash->mtd.type = MTD_NORFLASH; |
664 | flash->mtd.writesize = 1; | 664 | flash->mtd.writesize = 1; |
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); |
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 3ea1de9be720..d4fb9a3ab4df 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 16555cbeaea4..7214b876feba 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 dfbf3f270cea..1db16e549e38 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c | |||
@@ -108,13 +108,13 @@ static int physmap_flash_probe(struct platform_device *dev) | |||
108 | if (!devm_request_mem_region(&dev->dev, | 108 | if (!devm_request_mem_region(&dev->dev, |
109 | dev->resource[i].start, | 109 | dev->resource[i].start, |
110 | dev->resource[i].end - dev->resource[i].start + 1, | 110 | dev->resource[i].end - dev->resource[i].start + 1, |
111 | dev->dev.bus_id)) { | 111 | dev_name(&dev->dev))) { |
112 | dev_err(&dev->dev, "Could not reserve memory region\n"); | 112 | dev_err(&dev->dev, "Could not reserve memory region\n"); |
113 | err = -ENOMEM; | 113 | err = -ENOMEM; |
114 | goto err_out; | 114 | goto err_out; |
115 | } | 115 | } |
116 | 116 | ||
117 | info->map[i].name = dev->dev.bus_id; | 117 | info->map[i].name = dev_name(&dev->dev); |
118 | info->map[i].phys = dev->resource[i].start; | 118 | info->map[i].phys = dev->resource[i].start; |
119 | info->map[i].size = dev->resource[i].end - dev->resource[i].start + 1; | 119 | info->map[i].size = dev->resource[i].end - dev->resource[i].start + 1; |
120 | info->map[i].bankwidth = physmap_data->width; | 120 | info->map[i].bankwidth = physmap_data->width; |
@@ -150,7 +150,7 @@ static int physmap_flash_probe(struct platform_device *dev) | |||
150 | * We detected multiple devices. Concatenate them together. | 150 | * We detected multiple devices. Concatenate them together. |
151 | */ | 151 | */ |
152 | #ifdef CONFIG_MTD_CONCAT | 152 | #ifdef CONFIG_MTD_CONCAT |
153 | info->cmtd = mtd_concat_create(info->mtd, devices_found, dev->dev.bus_id); | 153 | info->cmtd = mtd_concat_create(info->mtd, devices_found, dev_name(&dev->dev)); |
154 | if (info->cmtd == NULL) | 154 | if (info->cmtd == NULL) |
155 | err = -ENXIO; | 155 | err = -ENXIO; |
156 | #else | 156 | #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 789842d0e6f2..1a05cf37851e 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 d1e0b8e7224b..96ecc1766fa8 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 ba0bd3d5775b..7caf22cd5ad0 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; |