mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
spi: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: dbrownell@users.sourceforge.net Cc: spi-devel-general@lists.sourceforge.net Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
This commit is contained in:
parent
031d551859
commit
6c7377ab68
@ -322,7 +322,7 @@ static void atmel_spi_next_message(struct spi_master *master)
|
|||||||
spi = msg->spi;
|
spi = msg->spi;
|
||||||
|
|
||||||
dev_dbg(master->dev.parent, "start message %p for %s\n",
|
dev_dbg(master->dev.parent, "start message %p for %s\n",
|
||||||
msg, spi->dev.bus_id);
|
msg, dev_name(&spi->dev));
|
||||||
|
|
||||||
/* select chip if it's not still active */
|
/* select chip if it's not still active */
|
||||||
if (as->stay) {
|
if (as->stay) {
|
||||||
@ -627,7 +627,7 @@ static int atmel_spi_setup(struct spi_device *spi)
|
|||||||
if (!asd)
|
if (!asd)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ret = gpio_request(npcs_pin, spi->dev.bus_id);
|
ret = gpio_request(npcs_pin, dev_name(&spi->dev));
|
||||||
if (ret) {
|
if (ret) {
|
||||||
kfree(asd);
|
kfree(asd);
|
||||||
return ret;
|
return ret;
|
||||||
@ -668,7 +668,7 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
|
|||||||
as = spi_master_get_devdata(spi->master);
|
as = spi_master_get_devdata(spi->master);
|
||||||
|
|
||||||
dev_dbg(controller, "new message %p submitted for %s\n",
|
dev_dbg(controller, "new message %p submitted for %s\n",
|
||||||
msg, spi->dev.bus_id);
|
msg, dev_name(&spi->dev));
|
||||||
|
|
||||||
if (unlikely(list_empty(&msg->transfers)))
|
if (unlikely(list_empty(&msg->transfers)))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -803,7 +803,7 @@ static int __init atmel_spi_probe(struct platform_device *pdev)
|
|||||||
as->clk = clk;
|
as->clk = clk;
|
||||||
|
|
||||||
ret = request_irq(irq, atmel_spi_interrupt, 0,
|
ret = request_irq(irq, atmel_spi_interrupt, 0,
|
||||||
pdev->dev.bus_id, master);
|
dev_name(&pdev->dev), master);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_unmap_regs;
|
goto out_unmap_regs;
|
||||||
|
|
||||||
|
@ -429,7 +429,7 @@ static int __init mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr,
|
|||||||
INIT_LIST_HEAD(&mps->queue);
|
INIT_LIST_HEAD(&mps->queue);
|
||||||
|
|
||||||
mps->workqueue = create_singlethread_workqueue(
|
mps->workqueue = create_singlethread_workqueue(
|
||||||
master->dev.parent->bus_id);
|
dev_name(master->dev.parent));
|
||||||
if (mps->workqueue == NULL) {
|
if (mps->workqueue == NULL) {
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
goto free_irq;
|
goto free_irq;
|
||||||
|
@ -1003,7 +1003,7 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev)
|
|||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
if (!request_mem_region(r->start, (r->end - r->start) + 1,
|
if (!request_mem_region(r->start, (r->end - r->start) + 1,
|
||||||
pdev->dev.bus_id)) {
|
dev_name(&pdev->dev))) {
|
||||||
status = -EBUSY;
|
status = -EBUSY;
|
||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ static int uwire_txrx(struct spi_device *spi, struct spi_transfer *t)
|
|||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
pr_debug("%s: write-%d =%04x\n",
|
pr_debug("%s: write-%d =%04x\n",
|
||||||
spi->dev.bus_id, bits, val);
|
dev_name(&spi->dev), bits, val);
|
||||||
#endif
|
#endif
|
||||||
if (wait_uwire_csr_flag(CSRB, 0, 0))
|
if (wait_uwire_csr_flag(CSRB, 0, 0))
|
||||||
goto eio;
|
goto eio;
|
||||||
@ -305,7 +305,7 @@ static int uwire_txrx(struct spi_device *spi, struct spi_transfer *t)
|
|||||||
status += bytes;
|
status += bytes;
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
pr_debug("%s: read-%d =%04x\n",
|
pr_debug("%s: read-%d =%04x\n",
|
||||||
spi->dev.bus_id, bits, val);
|
dev_name(&spi->dev), bits, val);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -331,7 +331,7 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
|
|||||||
uwire = spi_master_get_devdata(spi->master);
|
uwire = spi_master_get_devdata(spi->master);
|
||||||
|
|
||||||
if (spi->chip_select > 3) {
|
if (spi->chip_select > 3) {
|
||||||
pr_debug("%s: cs%d?\n", spi->dev.bus_id, spi->chip_select);
|
pr_debug("%s: cs%d?\n", dev_name(&spi->dev), spi->chip_select);
|
||||||
status = -ENODEV;
|
status = -ENODEV;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -343,7 +343,7 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
|
|||||||
bits = 8;
|
bits = 8;
|
||||||
|
|
||||||
if (bits > 16) {
|
if (bits > 16) {
|
||||||
pr_debug("%s: wordsize %d?\n", spi->dev.bus_id, bits);
|
pr_debug("%s: wordsize %d?\n", dev_name(&spi->dev), bits);
|
||||||
status = -ENODEV;
|
status = -ENODEV;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -378,7 +378,7 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
|
|||||||
hz = t->speed_hz;
|
hz = t->speed_hz;
|
||||||
|
|
||||||
if (!hz) {
|
if (!hz) {
|
||||||
pr_debug("%s: zero speed?\n", spi->dev.bus_id);
|
pr_debug("%s: zero speed?\n", dev_name(&spi->dev));
|
||||||
status = -EINVAL;
|
status = -EINVAL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -406,7 +406,7 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
|
|||||||
}
|
}
|
||||||
if (div1_idx == 4) {
|
if (div1_idx == 4) {
|
||||||
pr_debug("%s: lowest clock %ld, need %d\n",
|
pr_debug("%s: lowest clock %ld, need %d\n",
|
||||||
spi->dev.bus_id, rate / 10 / 8, hz);
|
dev_name(&spi->dev), rate / 10 / 8, hz);
|
||||||
status = -EDOM;
|
status = -EDOM;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -496,7 +496,7 @@ static int __init orion_spi_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!request_mem_region(r->start, (r->end - r->start) + 1,
|
if (!request_mem_region(r->start, (r->end - r->start) + 1,
|
||||||
pdev->dev.bus_id)) {
|
dev_name(&pdev->dev))) {
|
||||||
status = -EBUSY;
|
status = -EBUSY;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -1333,7 +1333,7 @@ static int __init init_queue(struct driver_data *drv_data)
|
|||||||
|
|
||||||
INIT_WORK(&drv_data->pump_messages, pump_messages);
|
INIT_WORK(&drv_data->pump_messages, pump_messages);
|
||||||
drv_data->workqueue = create_singlethread_workqueue(
|
drv_data->workqueue = create_singlethread_workqueue(
|
||||||
drv_data->master->dev.parent->bus_id);
|
dev_name(drv_data->master->dev.parent));
|
||||||
if (drv_data->workqueue == NULL)
|
if (drv_data->workqueue == NULL)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
@ -1462,7 +1462,7 @@ static int __init pxa2xx_spi_probe(struct platform_device *pdev)
|
|||||||
drv_data->mask_sr = SSSR_TINT | SSSR_RFS | SSSR_TFS | SSSR_ROR;
|
drv_data->mask_sr = SSSR_TINT | SSSR_RFS | SSSR_TFS | SSSR_ROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = request_irq(ssp->irq, ssp_int, 0, dev->bus_id, drv_data);
|
status = request_irq(ssp->irq, ssp_int, 0, dev_name(dev), drv_data);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
dev_err(&pdev->dev, "cannot get IRQ %d\n", ssp->irq);
|
dev_err(&pdev->dev, "cannot get IRQ %d\n", ssp->irq);
|
||||||
goto out_error_master_alloc;
|
goto out_error_master_alloc;
|
||||||
|
@ -1160,8 +1160,8 @@ static inline int init_queue(struct driver_data *drv_data)
|
|||||||
|
|
||||||
/* init messages workqueue */
|
/* init messages workqueue */
|
||||||
INIT_WORK(&drv_data->pump_messages, pump_messages);
|
INIT_WORK(&drv_data->pump_messages, pump_messages);
|
||||||
drv_data->workqueue =
|
drv_data->workqueue = create_singlethread_workqueue(
|
||||||
create_singlethread_workqueue(drv_data->master->dev.parent->bus_id);
|
dev_name(drv_data->master->dev.parent));
|
||||||
if (drv_data->workqueue == NULL)
|
if (drv_data->workqueue == NULL)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ static int spi_gpio_setup(struct spi_device *spi)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (!spi->controller_state) {
|
if (!spi->controller_state) {
|
||||||
status = gpio_request(cs, spi->dev.bus_id);
|
status = gpio_request(cs, dev_name(&spi->dev));
|
||||||
if (status)
|
if (status)
|
||||||
return status;
|
return status;
|
||||||
status = gpio_direction_output(cs, spi->mode & SPI_CS_HIGH);
|
status = gpio_direction_output(cs, spi->mode & SPI_CS_HIGH);
|
||||||
|
@ -1381,7 +1381,7 @@ static int __init init_queue(struct driver_data *drv_data)
|
|||||||
|
|
||||||
INIT_WORK(&drv_data->work, pump_messages);
|
INIT_WORK(&drv_data->work, pump_messages);
|
||||||
drv_data->workqueue = create_singlethread_workqueue(
|
drv_data->workqueue = create_singlethread_workqueue(
|
||||||
drv_data->master->dev.parent->bus_id);
|
dev_name(drv_data->master->dev.parent));
|
||||||
if (drv_data->workqueue == NULL)
|
if (drv_data->workqueue == NULL)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
@ -1525,7 +1525,8 @@ static int __init spi_imx_probe(struct platform_device *pdev)
|
|||||||
status = -ENODEV;
|
status = -ENODEV;
|
||||||
goto err_no_irqres;
|
goto err_no_irqres;
|
||||||
}
|
}
|
||||||
status = request_irq(irq, spi_int, IRQF_DISABLED, dev->bus_id, drv_data);
|
status = request_irq(irq, spi_int, IRQF_DISABLED,
|
||||||
|
dev_name(dev), drv_data);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
dev_err(&pdev->dev, "probe - cannot get IRQ (%d)\n", status);
|
dev_err(&pdev->dev, "probe - cannot get IRQ (%d)\n", status);
|
||||||
goto err_no_irqres;
|
goto err_no_irqres;
|
||||||
|
@ -637,7 +637,7 @@ static int __init mpc83xx_spi_probe(struct platform_device *dev)
|
|||||||
INIT_LIST_HEAD(&mpc83xx_spi->queue);
|
INIT_LIST_HEAD(&mpc83xx_spi->queue);
|
||||||
|
|
||||||
mpc83xx_spi->workqueue = create_singlethread_workqueue(
|
mpc83xx_spi->workqueue = create_singlethread_workqueue(
|
||||||
master->dev.parent->bus_id);
|
dev_name(master->dev.parent));
|
||||||
if (mpc83xx_spi->workqueue == NULL) {
|
if (mpc83xx_spi->workqueue == NULL) {
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
goto free_irq;
|
goto free_irq;
|
||||||
@ -649,7 +649,7 @@ static int __init mpc83xx_spi_probe(struct platform_device *dev)
|
|||||||
|
|
||||||
printk(KERN_INFO
|
printk(KERN_INFO
|
||||||
"%s: MPC83xx SPI Controller driver at 0x%p (irq = %d)\n",
|
"%s: MPC83xx SPI Controller driver at 0x%p (irq = %d)\n",
|
||||||
dev->dev.bus_id, mpc83xx_spi->base, mpc83xx_spi->irq);
|
dev_name(&dev->dev), mpc83xx_spi->base, mpc83xx_spi->irq);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -404,7 +404,8 @@ static int __init txx9spi_probe(struct platform_device *dev)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
c->workqueue = create_singlethread_workqueue(master->dev.parent->bus_id);
|
c->workqueue = create_singlethread_workqueue(
|
||||||
|
dev_name(master->dev.parent));
|
||||||
if (!c->workqueue)
|
if (!c->workqueue)
|
||||||
goto exit_busy;
|
goto exit_busy;
|
||||||
c->last_chipselect = -1;
|
c->last_chipselect = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user