mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 00:52:01 +00:00
[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>
This commit is contained in:
parent
d85316ac45
commit
160bbab300
@ -171,8 +171,8 @@ static int wait_till_ready(struct m25p *flash)
|
|||||||
static int erase_chip(struct m25p *flash)
|
static int erase_chip(struct m25p *flash)
|
||||||
{
|
{
|
||||||
DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %lldKiB\n",
|
DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %lldKiB\n",
|
||||||
flash->spi->dev.bus_id, __func__,
|
dev_name(&flash->spi->dev), __func__,
|
||||||
(long long)(flash->mtd.size >> 10));
|
(long long)(flash->mtd.size >> 10));
|
||||||
|
|
||||||
/* Wait until finished previous write command. */
|
/* Wait until finished previous write command. */
|
||||||
if (wait_till_ready(flash))
|
if (wait_till_ready(flash))
|
||||||
@ -198,7 +198,7 @@ static int erase_chip(struct m25p *flash)
|
|||||||
static int erase_sector(struct m25p *flash, u32 offset)
|
static int erase_sector(struct m25p *flash, u32 offset)
|
||||||
{
|
{
|
||||||
DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB at 0x%08x\n",
|
DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB at 0x%08x\n",
|
||||||
flash->spi->dev.bus_id, __func__,
|
dev_name(&flash->spi->dev), __func__,
|
||||||
flash->mtd.erasesize / 1024, offset);
|
flash->mtd.erasesize / 1024, offset);
|
||||||
|
|
||||||
/* Wait until finished previous write command. */
|
/* Wait until finished previous write command. */
|
||||||
@ -236,8 +236,8 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr)
|
|||||||
uint32_t rem;
|
uint32_t rem;
|
||||||
|
|
||||||
DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%llx, len %lld\n",
|
DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%llx, len %lld\n",
|
||||||
flash->spi->dev.bus_id, __func__, "at",
|
dev_name(&flash->spi->dev), __func__, "at",
|
||||||
(long long)instr->addr, (long long)instr->len);
|
(long long)instr->addr, (long long)instr->len);
|
||||||
|
|
||||||
/* sanity checks */
|
/* sanity checks */
|
||||||
if (instr->addr + instr->len > flash->mtd.size)
|
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,
|
|||||||
struct spi_message m;
|
struct spi_message m;
|
||||||
|
|
||||||
DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n",
|
DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n",
|
||||||
flash->spi->dev.bus_id, __func__, "from",
|
dev_name(&flash->spi->dev), __func__, "from",
|
||||||
(u32)from, len);
|
(u32)from, len);
|
||||||
|
|
||||||
/* sanity checks */
|
/* sanity checks */
|
||||||
@ -368,7 +368,7 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,
|
|||||||
struct spi_message m;
|
struct spi_message m;
|
||||||
|
|
||||||
DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n",
|
DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n",
|
||||||
flash->spi->dev.bus_id, __func__, "to",
|
dev_name(&flash->spi->dev), __func__, "to",
|
||||||
(u32)to, len);
|
(u32)to, len);
|
||||||
|
|
||||||
if (retlen)
|
if (retlen)
|
||||||
@ -564,7 +564,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
|
|||||||
tmp = spi_write_then_read(spi, &code, 1, id, 5);
|
tmp = spi_write_then_read(spi, &code, 1, id, 5);
|
||||||
if (tmp < 0) {
|
if (tmp < 0) {
|
||||||
DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n",
|
DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n",
|
||||||
spi->dev.bus_id, tmp);
|
dev_name(&spi->dev), tmp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
jedec = id[0];
|
jedec = id[0];
|
||||||
@ -618,7 +618,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
|
|||||||
/* unrecognized chip? */
|
/* unrecognized chip? */
|
||||||
if (i == ARRAY_SIZE(m25p_data)) {
|
if (i == ARRAY_SIZE(m25p_data)) {
|
||||||
DEBUG(MTD_DEBUG_LEVEL0, "%s: unrecognized id %s\n",
|
DEBUG(MTD_DEBUG_LEVEL0, "%s: unrecognized id %s\n",
|
||||||
spi->dev.bus_id, data->type);
|
dev_name(&spi->dev), data->type);
|
||||||
info = NULL;
|
info = NULL;
|
||||||
|
|
||||||
/* recognized; is that chip really what's there? */
|
/* recognized; is that chip really what's there? */
|
||||||
@ -659,7 +659,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
|
|||||||
if (data && data->name)
|
if (data && data->name)
|
||||||
flash->mtd.name = data->name;
|
flash->mtd.name = data->name;
|
||||||
else
|
else
|
||||||
flash->mtd.name = spi->dev.bus_id;
|
flash->mtd.name = dev_name(&spi->dev);
|
||||||
|
|
||||||
flash->mtd.type = MTD_NORFLASH;
|
flash->mtd.type = MTD_NORFLASH;
|
||||||
flash->mtd.writesize = 1;
|
flash->mtd.writesize = 1;
|
||||||
|
@ -129,7 +129,7 @@ static int dataflash_waitready(struct spi_device *spi)
|
|||||||
status = dataflash_status(spi);
|
status = dataflash_status(spi);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
DEBUG(MTD_DEBUG_LEVEL1, "%s: status %d?\n",
|
DEBUG(MTD_DEBUG_LEVEL1, "%s: status %d?\n",
|
||||||
spi->dev.bus_id, status);
|
dev_name(&spi->dev), status);
|
||||||
status = 0;
|
status = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,8 +156,8 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
|
|||||||
uint32_t rem;
|
uint32_t rem;
|
||||||
|
|
||||||
DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%llx len 0x%llx\n",
|
DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%llx len 0x%llx\n",
|
||||||
spi->dev.bus_id, (long long)instr->addr,
|
dev_name(&spi->dev), (long long)instr->addr,
|
||||||
(long long)instr->len);
|
(long long)instr->len);
|
||||||
|
|
||||||
/* Sanity checks */
|
/* Sanity checks */
|
||||||
if (instr->addr + instr->len > mtd->size)
|
if (instr->addr + instr->len > mtd->size)
|
||||||
@ -203,7 +203,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
|
|||||||
|
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
printk(KERN_ERR "%s: erase %x, err %d\n",
|
printk(KERN_ERR "%s: erase %x, err %d\n",
|
||||||
spi->dev.bus_id, pageaddr, status);
|
dev_name(&spi->dev), pageaddr, status);
|
||||||
/* REVISIT: can retry instr->retries times; or
|
/* REVISIT: can retry instr->retries times; or
|
||||||
* giveup and instr->fail_addr = instr->addr;
|
* giveup and instr->fail_addr = instr->addr;
|
||||||
*/
|
*/
|
||||||
@ -245,7 +245,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
|
|||||||
int status;
|
int status;
|
||||||
|
|
||||||
DEBUG(MTD_DEBUG_LEVEL2, "%s: read 0x%x..0x%x\n",
|
DEBUG(MTD_DEBUG_LEVEL2, "%s: read 0x%x..0x%x\n",
|
||||||
priv->spi->dev.bus_id, (unsigned)from, (unsigned)(from + len));
|
dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len));
|
||||||
|
|
||||||
*retlen = 0;
|
*retlen = 0;
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
|
|||||||
status = 0;
|
status = 0;
|
||||||
} else
|
} else
|
||||||
DEBUG(MTD_DEBUG_LEVEL1, "%s: read %x..%x --> %d\n",
|
DEBUG(MTD_DEBUG_LEVEL1, "%s: read %x..%x --> %d\n",
|
||||||
priv->spi->dev.bus_id,
|
dev_name(&priv->spi->dev),
|
||||||
(unsigned)from, (unsigned)(from + len),
|
(unsigned)from, (unsigned)(from + len),
|
||||||
status);
|
status);
|
||||||
return status;
|
return status;
|
||||||
@ -321,7 +321,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
|
|||||||
uint8_t *command;
|
uint8_t *command;
|
||||||
|
|
||||||
DEBUG(MTD_DEBUG_LEVEL2, "%s: write 0x%x..0x%x\n",
|
DEBUG(MTD_DEBUG_LEVEL2, "%s: write 0x%x..0x%x\n",
|
||||||
spi->dev.bus_id, (unsigned)to, (unsigned)(to + len));
|
dev_name(&spi->dev), (unsigned)to, (unsigned)(to + len));
|
||||||
|
|
||||||
*retlen = 0;
|
*retlen = 0;
|
||||||
|
|
||||||
@ -380,7 +380,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
|
|||||||
status = spi_sync(spi, &msg);
|
status = spi_sync(spi, &msg);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
DEBUG(MTD_DEBUG_LEVEL1, "%s: xfer %u -> %d \n",
|
DEBUG(MTD_DEBUG_LEVEL1, "%s: xfer %u -> %d \n",
|
||||||
spi->dev.bus_id, addr, status);
|
dev_name(&spi->dev), addr, status);
|
||||||
|
|
||||||
(void) dataflash_waitready(priv->spi);
|
(void) dataflash_waitready(priv->spi);
|
||||||
}
|
}
|
||||||
@ -402,7 +402,7 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
|
|||||||
spi_transfer_del(x + 1);
|
spi_transfer_del(x + 1);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
DEBUG(MTD_DEBUG_LEVEL1, "%s: pgm %u/%u -> %d \n",
|
DEBUG(MTD_DEBUG_LEVEL1, "%s: pgm %u/%u -> %d \n",
|
||||||
spi->dev.bus_id, addr, writelen, status);
|
dev_name(&spi->dev), addr, writelen, status);
|
||||||
|
|
||||||
(void) dataflash_waitready(priv->spi);
|
(void) dataflash_waitready(priv->spi);
|
||||||
|
|
||||||
@ -422,14 +422,14 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
|
|||||||
status = spi_sync(spi, &msg);
|
status = spi_sync(spi, &msg);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
DEBUG(MTD_DEBUG_LEVEL1, "%s: compare %u -> %d \n",
|
DEBUG(MTD_DEBUG_LEVEL1, "%s: compare %u -> %d \n",
|
||||||
spi->dev.bus_id, addr, status);
|
dev_name(&spi->dev), addr, status);
|
||||||
|
|
||||||
status = dataflash_waitready(priv->spi);
|
status = dataflash_waitready(priv->spi);
|
||||||
|
|
||||||
/* Check result of the compare operation */
|
/* Check result of the compare operation */
|
||||||
if (status & (1 << 6)) {
|
if (status & (1 << 6)) {
|
||||||
printk(KERN_ERR "%s: compare page %u, err %d\n",
|
printk(KERN_ERR "%s: compare page %u, err %d\n",
|
||||||
spi->dev.bus_id, pageaddr, status);
|
dev_name(&spi->dev), pageaddr, status);
|
||||||
remaining = 0;
|
remaining = 0;
|
||||||
status = -EIO;
|
status = -EIO;
|
||||||
break;
|
break;
|
||||||
@ -785,7 +785,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
|
|||||||
tmp = spi_write_then_read(spi, &code, 1, id, 3);
|
tmp = spi_write_then_read(spi, &code, 1, id, 3);
|
||||||
if (tmp < 0) {
|
if (tmp < 0) {
|
||||||
DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n",
|
DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n",
|
||||||
spi->dev.bus_id, tmp);
|
dev_name(&spi->dev), tmp);
|
||||||
return ERR_PTR(tmp);
|
return ERR_PTR(tmp);
|
||||||
}
|
}
|
||||||
if (id[0] != 0x1f)
|
if (id[0] != 0x1f)
|
||||||
@ -875,7 +875,7 @@ static int __devinit dataflash_probe(struct spi_device *spi)
|
|||||||
status = dataflash_status(spi);
|
status = dataflash_status(spi);
|
||||||
if (status <= 0 || status == 0xff) {
|
if (status <= 0 || status == 0xff) {
|
||||||
DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n",
|
DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n",
|
||||||
spi->dev.bus_id, status);
|
dev_name(&spi->dev), status);
|
||||||
if (status == 0 || status == 0xff)
|
if (status == 0 || status == 0xff)
|
||||||
status = -ENODEV;
|
status = -ENODEV;
|
||||||
return status;
|
return status;
|
||||||
@ -911,13 +911,13 @@ static int __devinit dataflash_probe(struct spi_device *spi)
|
|||||||
/* obsolete AT45DB1282 not (yet?) supported */
|
/* obsolete AT45DB1282 not (yet?) supported */
|
||||||
default:
|
default:
|
||||||
DEBUG(MTD_DEBUG_LEVEL1, "%s: unsupported device (%x)\n",
|
DEBUG(MTD_DEBUG_LEVEL1, "%s: unsupported device (%x)\n",
|
||||||
spi->dev.bus_id, status & 0x3c);
|
dev_name(&spi->dev), status & 0x3c);
|
||||||
status = -ENODEV;
|
status = -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
DEBUG(MTD_DEBUG_LEVEL1, "%s: add_dataflash --> %d\n",
|
DEBUG(MTD_DEBUG_LEVEL1, "%s: add_dataflash --> %d\n",
|
||||||
spi->dev.bus_id, status);
|
dev_name(&spi->dev), status);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -927,7 +927,7 @@ static int __devexit dataflash_remove(struct spi_device *spi)
|
|||||||
struct dataflash *flash = dev_get_drvdata(&spi->dev);
|
struct dataflash *flash = dev_get_drvdata(&spi->dev);
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
DEBUG(MTD_DEBUG_LEVEL1, "%s: remove\n", spi->dev.bus_id);
|
DEBUG(MTD_DEBUG_LEVEL1, "%s: remove\n", dev_name(&spi->dev));
|
||||||
|
|
||||||
if (mtd_has_partitions() && flash->partitioned)
|
if (mtd_has_partitions() && flash->partitioned)
|
||||||
status = del_mtd_partitions(&flash->mtd);
|
status = del_mtd_partitions(&flash->mtd);
|
||||||
|
@ -105,7 +105,7 @@ static int armflash_probe(struct platform_device *dev)
|
|||||||
info->map.bankwidth = plat->width;
|
info->map.bankwidth = plat->width;
|
||||||
info->map.phys = res->start;
|
info->map.phys = res->start;
|
||||||
info->map.virt = base;
|
info->map.virt = base;
|
||||||
info->map.name = dev->dev.bus_id;
|
info->map.name = dev_name(&dev->dev);
|
||||||
info->map.set_vpp = armflash_set_vpp;
|
info->map.set_vpp = armflash_set_vpp;
|
||||||
|
|
||||||
simple_map_init(&info->map);
|
simple_map_init(&info->map);
|
||||||
|
@ -188,7 +188,7 @@ static int ixp2000_flash_probe(struct platform_device *dev)
|
|||||||
*/
|
*/
|
||||||
info->map.map_priv_2 = (unsigned long) ixp_data->bank_setup;
|
info->map.map_priv_2 = (unsigned long) ixp_data->bank_setup;
|
||||||
|
|
||||||
info->map.name = dev->dev.bus_id;
|
info->map.name = dev_name(&dev->dev);
|
||||||
info->map.read = ixp2000_flash_read8;
|
info->map.read = ixp2000_flash_read8;
|
||||||
info->map.write = ixp2000_flash_write8;
|
info->map.write = ixp2000_flash_write8;
|
||||||
info->map.copy_from = ixp2000_flash_copy_from;
|
info->map.copy_from = ixp2000_flash_copy_from;
|
||||||
@ -196,7 +196,7 @@ static int ixp2000_flash_probe(struct platform_device *dev)
|
|||||||
|
|
||||||
info->res = request_mem_region(dev->resource->start,
|
info->res = request_mem_region(dev->resource->start,
|
||||||
dev->resource->end - dev->resource->start + 1,
|
dev->resource->end - dev->resource->start + 1,
|
||||||
dev->dev.bus_id);
|
dev_name(&dev->dev));
|
||||||
if (!info->res) {
|
if (!info->res) {
|
||||||
dev_err(&dev->dev, "Could not reserve memory region\n");
|
dev_err(&dev->dev, "Could not reserve memory region\n");
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
|
@ -218,7 +218,7 @@ static int ixp4xx_flash_probe(struct platform_device *dev)
|
|||||||
* handle that.
|
* handle that.
|
||||||
*/
|
*/
|
||||||
info->map.bankwidth = 2;
|
info->map.bankwidth = 2;
|
||||||
info->map.name = dev->dev.bus_id;
|
info->map.name = dev_name(&dev->dev);
|
||||||
info->map.read = ixp4xx_read16,
|
info->map.read = ixp4xx_read16,
|
||||||
info->map.write = ixp4xx_probe_write16,
|
info->map.write = ixp4xx_probe_write16,
|
||||||
info->map.copy_from = ixp4xx_copy_from,
|
info->map.copy_from = ixp4xx_copy_from,
|
||||||
|
@ -101,7 +101,7 @@ static int __init omapflash_probe(struct platform_device *pdev)
|
|||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto out_release_mem_region;
|
goto out_release_mem_region;
|
||||||
}
|
}
|
||||||
info->map.name = pdev->dev.bus_id;
|
info->map.name = dev_name(&pdev->dev);
|
||||||
info->map.phys = res->start;
|
info->map.phys = res->start;
|
||||||
info->map.size = size;
|
info->map.size = size;
|
||||||
info->map.bankwidth = pdata->width;
|
info->map.bankwidth = pdata->width;
|
||||||
|
@ -106,13 +106,13 @@ static int physmap_flash_probe(struct platform_device *dev)
|
|||||||
if (!devm_request_mem_region(&dev->dev,
|
if (!devm_request_mem_region(&dev->dev,
|
||||||
dev->resource[i].start,
|
dev->resource[i].start,
|
||||||
dev->resource[i].end - dev->resource[i].start + 1,
|
dev->resource[i].end - dev->resource[i].start + 1,
|
||||||
dev->dev.bus_id)) {
|
dev_name(&dev->dev))) {
|
||||||
dev_err(&dev->dev, "Could not reserve memory region\n");
|
dev_err(&dev->dev, "Could not reserve memory region\n");
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
info->map[i].name = dev->dev.bus_id;
|
info->map[i].name = dev_name(&dev->dev);
|
||||||
info->map[i].phys = dev->resource[i].start;
|
info->map[i].phys = dev->resource[i].start;
|
||||||
info->map[i].size = dev->resource[i].end - dev->resource[i].start + 1;
|
info->map[i].size = dev->resource[i].end - dev->resource[i].start + 1;
|
||||||
info->map[i].bankwidth = physmap_data->width;
|
info->map[i].bankwidth = physmap_data->width;
|
||||||
@ -148,7 +148,7 @@ static int physmap_flash_probe(struct platform_device *dev)
|
|||||||
* We detected multiple devices. Concatenate them together.
|
* We detected multiple devices. Concatenate them together.
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_MTD_CONCAT
|
#ifdef CONFIG_MTD_CONCAT
|
||||||
info->cmtd = mtd_concat_create(info->mtd, devices_found, dev->dev.bus_id);
|
info->cmtd = mtd_concat_create(info->mtd, devices_found, dev_name(&dev->dev));
|
||||||
if (info->cmtd == NULL)
|
if (info->cmtd == NULL)
|
||||||
err = -ENXIO;
|
err = -ENXIO;
|
||||||
#else
|
#else
|
||||||
|
@ -183,7 +183,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
|
|||||||
|
|
||||||
err = -EBUSY;
|
err = -EBUSY;
|
||||||
info->res = request_mem_region(res.start, res.end - res.start + 1,
|
info->res = request_mem_region(res.start, res.end - res.start + 1,
|
||||||
dev->dev.bus_id);
|
dev_name(&dev->dev));
|
||||||
if (!info->res)
|
if (!info->res)
|
||||||
goto err_out;
|
goto err_out;
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
|
|||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
info->map.name = dev->dev.bus_id;
|
info->map.name = dev_name(&dev->dev);
|
||||||
info->map.phys = res.start;
|
info->map.phys = res.start;
|
||||||
info->map.size = res.end - res.start + 1;
|
info->map.size = res.end - res.start + 1;
|
||||||
info->map.bankwidth = *width;
|
info->map.bankwidth = *width;
|
||||||
|
@ -691,7 +691,7 @@ static int concat_block_markbad(struct mtd_info *mtd, loff_t ofs)
|
|||||||
*/
|
*/
|
||||||
struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to concatenate */
|
struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to concatenate */
|
||||||
int num_devs, /* number of subdevices */
|
int num_devs, /* number of subdevices */
|
||||||
char *name)
|
const char *name)
|
||||||
{ /* name for the new device */
|
{ /* name for the new device */
|
||||||
int i;
|
int i;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
@ -222,7 +222,7 @@ static int __devinit fun_probe(struct of_device *ofdev,
|
|||||||
|
|
||||||
fun->rnb_gpio = of_get_gpio(ofdev->node, 0);
|
fun->rnb_gpio = of_get_gpio(ofdev->node, 0);
|
||||||
if (fun->rnb_gpio >= 0) {
|
if (fun->rnb_gpio >= 0) {
|
||||||
ret = gpio_request(fun->rnb_gpio, ofdev->dev.bus_id);
|
ret = gpio_request(fun->rnb_gpio, dev_name(&ofdev->dev));
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&ofdev->dev, "can't request RNB gpio\n");
|
dev_err(&ofdev->dev, "can't request RNB gpio\n");
|
||||||
goto err2;
|
goto err2;
|
||||||
|
@ -54,7 +54,7 @@ static int __init plat_nand_probe(struct platform_device *pdev)
|
|||||||
data->chip.priv = &data;
|
data->chip.priv = &data;
|
||||||
data->mtd.priv = &data->chip;
|
data->mtd.priv = &data->chip;
|
||||||
data->mtd.owner = THIS_MODULE;
|
data->mtd.owner = THIS_MODULE;
|
||||||
data->mtd.name = pdev->dev.bus_id;
|
data->mtd.name = dev_name(&pdev->dev);
|
||||||
|
|
||||||
data->chip.IO_ADDR_R = data->io_base;
|
data->chip.IO_ADDR_R = data->io_base;
|
||||||
data->chip.IO_ADDR_W = data->io_base;
|
data->chip.IO_ADDR_W = data->io_base;
|
||||||
|
@ -433,7 +433,7 @@ static int tmio_probe(struct platform_device *dev)
|
|||||||
nand_chip->chip_delay = 15;
|
nand_chip->chip_delay = 15;
|
||||||
|
|
||||||
retval = request_irq(irq, &tmio_irq,
|
retval = request_irq(irq, &tmio_irq,
|
||||||
IRQF_DISABLED, dev->dev.bus_id, tmio);
|
IRQF_DISABLED, dev_name(&dev->dev), tmio);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
dev_err(&dev->dev, "request_irq error %d\n", retval);
|
dev_err(&dev->dev, "request_irq error %d\n", retval);
|
||||||
goto err_irq;
|
goto err_irq;
|
||||||
|
@ -63,7 +63,7 @@ static int __devinit generic_onenand_probe(struct device *dev)
|
|||||||
info->onenand.mmcontrol = pdata->mmcontrol;
|
info->onenand.mmcontrol = pdata->mmcontrol;
|
||||||
info->onenand.irq = platform_get_irq(pdev, 0);
|
info->onenand.irq = platform_get_irq(pdev, 0);
|
||||||
|
|
||||||
info->mtd.name = pdev->dev.bus_id;
|
info->mtd.name = dev_name(&pdev->dev);
|
||||||
info->mtd.priv = &info->onenand;
|
info->mtd.priv = &info->onenand;
|
||||||
info->mtd.owner = THIS_MODULE;
|
info->mtd.owner = THIS_MODULE;
|
||||||
|
|
||||||
|
@ -668,7 +668,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
|
|||||||
c->onenand.base);
|
c->onenand.base);
|
||||||
|
|
||||||
c->pdev = pdev;
|
c->pdev = pdev;
|
||||||
c->mtd.name = pdev->dev.bus_id;
|
c->mtd.name = dev_name(&pdev->dev);
|
||||||
c->mtd.priv = &c->onenand;
|
c->mtd.priv = &c->onenand;
|
||||||
c->mtd.owner = THIS_MODULE;
|
c->mtd.owner = THIS_MODULE;
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ static int ubi_sysfs_init(struct ubi_device *ubi)
|
|||||||
ubi->dev.release = dev_release;
|
ubi->dev.release = dev_release;
|
||||||
ubi->dev.devt = ubi->cdev.dev;
|
ubi->dev.devt = ubi->cdev.dev;
|
||||||
ubi->dev.class = ubi_class;
|
ubi->dev.class = ubi_class;
|
||||||
sprintf(&ubi->dev.bus_id[0], UBI_NAME_STR"%d", ubi->ubi_num);
|
dev_set_name(&ubi->dev, UBI_NAME_STR"%d", ubi->ubi_num);
|
||||||
err = device_register(&ubi->dev);
|
err = device_register(&ubi->dev);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
@ -329,7 +329,7 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req)
|
|||||||
vol->dev.devt = dev;
|
vol->dev.devt = dev;
|
||||||
vol->dev.class = ubi_class;
|
vol->dev.class = ubi_class;
|
||||||
|
|
||||||
sprintf(&vol->dev.bus_id[0], "%s_%d", ubi->ubi_name, vol->vol_id);
|
dev_set_name(&vol->dev, "%s_%d", ubi->ubi_name, vol->vol_id);
|
||||||
err = device_register(&vol->dev);
|
err = device_register(&vol->dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
ubi_err("cannot register device");
|
ubi_err("cannot register device");
|
||||||
@ -678,7 +678,7 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol)
|
|||||||
vol->dev.parent = &ubi->dev;
|
vol->dev.parent = &ubi->dev;
|
||||||
vol->dev.devt = dev;
|
vol->dev.devt = dev;
|
||||||
vol->dev.class = ubi_class;
|
vol->dev.class = ubi_class;
|
||||||
sprintf(&vol->dev.bus_id[0], "%s_%d", ubi->ubi_name, vol->vol_id);
|
dev_set_name(&vol->dev, "%s_%d", ubi->ubi_name, vol->vol_id);
|
||||||
err = device_register(&vol->dev);
|
err = device_register(&vol->dev);
|
||||||
if (err)
|
if (err)
|
||||||
goto out_gluebi;
|
goto out_gluebi;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
struct mtd_info *mtd_concat_create(
|
struct mtd_info *mtd_concat_create(
|
||||||
struct mtd_info *subdev[], /* subdevices to concatenate */
|
struct mtd_info *subdev[], /* subdevices to concatenate */
|
||||||
int num_devs, /* number of subdevices */
|
int num_devs, /* number of subdevices */
|
||||||
char *name); /* name for the new device */
|
const char *name); /* name for the new device */
|
||||||
|
|
||||||
void mtd_concat_destroy(struct mtd_info *mtd);
|
void mtd_concat_destroy(struct mtd_info *mtd);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user