aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-29 23:04:53 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-29 23:04:53 -0400
commit9ff9a26b786c35ee8d2a66222924a807ec851a9f (patch)
treedb432a17bccca1ca2c16907f0ee83ac449ed4012 /drivers/spi
parent0a3108beea9143225119d5e7c72a8e2c64f3eb7d (diff)
parent0d34fb8e93ceba7b6dad0062dbb4a0813bacd75b (diff)
Merge commit 'origin/master' into next
Manual merge of: arch/powerpc/include/asm/elf.h drivers/i2c/busses/i2c-mpc.c
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/atmel_spi.c8
-rw-r--r--drivers/spi/mpc52xx_psc_spi.c2
-rw-r--r--drivers/spi/omap2_mcspi.c6
-rw-r--r--drivers/spi/omap_uwire.c21
-rw-r--r--drivers/spi/orion_spi.c2
-rw-r--r--drivers/spi/pxa2xx_spi.c6
-rw-r--r--drivers/spi/spi_bfin5xx.c4
-rw-r--r--drivers/spi/spi_gpio.c2
-rw-r--r--drivers/spi/spi_imx.c5
-rw-r--r--drivers/spi/spi_mpc83xx.c4
-rw-r--r--drivers/spi/spi_txx9.c3
11 files changed, 32 insertions, 31 deletions
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 56ff3e6864ea..12e443cc4ac9 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -322,7 +322,7 @@ static void atmel_spi_next_message(struct spi_master *master)
322 spi = msg->spi; 322 spi = msg->spi;
323 323
324 dev_dbg(master->dev.parent, "start message %p for %s\n", 324 dev_dbg(master->dev.parent, "start message %p for %s\n",
325 msg, spi->dev.bus_id); 325 msg, dev_name(&spi->dev));
326 326
327 /* select chip if it's not still active */ 327 /* select chip if it's not still active */
328 if (as->stay) { 328 if (as->stay) {
@@ -627,7 +627,7 @@ static int atmel_spi_setup(struct spi_device *spi)
627 if (!asd) 627 if (!asd)
628 return -ENOMEM; 628 return -ENOMEM;
629 629
630 ret = gpio_request(npcs_pin, spi->dev.bus_id); 630 ret = gpio_request(npcs_pin, dev_name(&spi->dev));
631 if (ret) { 631 if (ret) {
632 kfree(asd); 632 kfree(asd);
633 return ret; 633 return ret;
@@ -668,7 +668,7 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
668 as = spi_master_get_devdata(spi->master); 668 as = spi_master_get_devdata(spi->master);
669 669
670 dev_dbg(controller, "new message %p submitted for %s\n", 670 dev_dbg(controller, "new message %p submitted for %s\n",
671 msg, spi->dev.bus_id); 671 msg, dev_name(&spi->dev));
672 672
673 if (unlikely(list_empty(&msg->transfers))) 673 if (unlikely(list_empty(&msg->transfers)))
674 return -EINVAL; 674 return -EINVAL;
@@ -803,7 +803,7 @@ static int __init atmel_spi_probe(struct platform_device *pdev)
803 as->clk = clk; 803 as->clk = clk;
804 804
805 ret = request_irq(irq, atmel_spi_interrupt, 0, 805 ret = request_irq(irq, atmel_spi_interrupt, 0,
806 pdev->dev.bus_id, master); 806 dev_name(&pdev->dev), master);
807 if (ret) 807 if (ret)
808 goto out_unmap_regs; 808 goto out_unmap_regs;
809 809
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c
index 3b97803e1d11..68c77a911595 100644
--- a/drivers/spi/mpc52xx_psc_spi.c
+++ b/drivers/spi/mpc52xx_psc_spi.c
@@ -429,7 +429,7 @@ static int __init mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr,
429 INIT_LIST_HEAD(&mps->queue); 429 INIT_LIST_HEAD(&mps->queue);
430 430
431 mps->workqueue = create_singlethread_workqueue( 431 mps->workqueue = create_singlethread_workqueue(
432 master->dev.parent->bus_id); 432 dev_name(master->dev.parent));
433 if (mps->workqueue == NULL) { 433 if (mps->workqueue == NULL) {
434 ret = -EBUSY; 434 ret = -EBUSY;
435 goto free_irq; 435 goto free_irq;
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index 454a2712e629..d6d0c5d241ce 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -1003,7 +1003,7 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev)
1003 goto err1; 1003 goto err1;
1004 } 1004 }
1005 if (!request_mem_region(r->start, (r->end - r->start) + 1, 1005 if (!request_mem_region(r->start, (r->end - r->start) + 1,
1006 pdev->dev.bus_id)) { 1006 dev_name(&pdev->dev))) {
1007 status = -EBUSY; 1007 status = -EBUSY;
1008 goto err1; 1008 goto err1;
1009 } 1009 }
@@ -1021,13 +1021,13 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev)
1021 spin_lock_init(&mcspi->lock); 1021 spin_lock_init(&mcspi->lock);
1022 INIT_LIST_HEAD(&mcspi->msg_queue); 1022 INIT_LIST_HEAD(&mcspi->msg_queue);
1023 1023
1024 mcspi->ick = clk_get(&pdev->dev, "mcspi_ick"); 1024 mcspi->ick = clk_get(&pdev->dev, "ick");
1025 if (IS_ERR(mcspi->ick)) { 1025 if (IS_ERR(mcspi->ick)) {
1026 dev_dbg(&pdev->dev, "can't get mcspi_ick\n"); 1026 dev_dbg(&pdev->dev, "can't get mcspi_ick\n");
1027 status = PTR_ERR(mcspi->ick); 1027 status = PTR_ERR(mcspi->ick);
1028 goto err1a; 1028 goto err1a;
1029 } 1029 }
1030 mcspi->fck = clk_get(&pdev->dev, "mcspi_fck"); 1030 mcspi->fck = clk_get(&pdev->dev, "fck");
1031 if (IS_ERR(mcspi->fck)) { 1031 if (IS_ERR(mcspi->fck)) {
1032 dev_dbg(&pdev->dev, "can't get mcspi_fck\n"); 1032 dev_dbg(&pdev->dev, "can't get mcspi_fck\n");
1033 status = PTR_ERR(mcspi->fck); 1033 status = PTR_ERR(mcspi->fck);
diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c
index bab6ff061e91..fe8b9ac0ccef 100644
--- a/drivers/spi/omap_uwire.c
+++ b/drivers/spi/omap_uwire.c
@@ -245,7 +245,7 @@ static int uwire_txrx(struct spi_device *spi, struct spi_transfer *t)
245 245
246#ifdef VERBOSE 246#ifdef VERBOSE
247 pr_debug("%s: write-%d =%04x\n", 247 pr_debug("%s: write-%d =%04x\n",
248 spi->dev.bus_id, bits, val); 248 dev_name(&spi->dev), bits, val);
249#endif 249#endif
250 if (wait_uwire_csr_flag(CSRB, 0, 0)) 250 if (wait_uwire_csr_flag(CSRB, 0, 0))
251 goto eio; 251 goto eio;
@@ -305,7 +305,7 @@ static int uwire_txrx(struct spi_device *spi, struct spi_transfer *t)
305 status += bytes; 305 status += bytes;
306#ifdef VERBOSE 306#ifdef VERBOSE
307 pr_debug("%s: read-%d =%04x\n", 307 pr_debug("%s: read-%d =%04x\n",
308 spi->dev.bus_id, bits, val); 308 dev_name(&spi->dev), bits, val);
309#endif 309#endif
310 310
311 } 311 }
@@ -331,7 +331,7 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
331 uwire = spi_master_get_devdata(spi->master); 331 uwire = spi_master_get_devdata(spi->master);
332 332
333 if (spi->chip_select > 3) { 333 if (spi->chip_select > 3) {
334 pr_debug("%s: cs%d?\n", spi->dev.bus_id, spi->chip_select); 334 pr_debug("%s: cs%d?\n", dev_name(&spi->dev), spi->chip_select);
335 status = -ENODEV; 335 status = -ENODEV;
336 goto done; 336 goto done;
337 } 337 }
@@ -343,7 +343,7 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
343 bits = 8; 343 bits = 8;
344 344
345 if (bits > 16) { 345 if (bits > 16) {
346 pr_debug("%s: wordsize %d?\n", spi->dev.bus_id, bits); 346 pr_debug("%s: wordsize %d?\n", dev_name(&spi->dev), bits);
347 status = -ENODEV; 347 status = -ENODEV;
348 goto done; 348 goto done;
349 } 349 }
@@ -378,7 +378,7 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
378 hz = t->speed_hz; 378 hz = t->speed_hz;
379 379
380 if (!hz) { 380 if (!hz) {
381 pr_debug("%s: zero speed?\n", spi->dev.bus_id); 381 pr_debug("%s: zero speed?\n", dev_name(&spi->dev));
382 status = -EINVAL; 382 status = -EINVAL;
383 goto done; 383 goto done;
384 } 384 }
@@ -406,7 +406,7 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
406 } 406 }
407 if (div1_idx == 4) { 407 if (div1_idx == 4) {
408 pr_debug("%s: lowest clock %ld, need %d\n", 408 pr_debug("%s: lowest clock %ld, need %d\n",
409 spi->dev.bus_id, rate / 10 / 8, hz); 409 dev_name(&spi->dev), rate / 10 / 8, hz);
410 status = -EDOM; 410 status = -EDOM;
411 goto done; 411 goto done;
412 } 412 }
@@ -506,11 +506,12 @@ static int __init uwire_probe(struct platform_device *pdev)
506 506
507 dev_set_drvdata(&pdev->dev, uwire); 507 dev_set_drvdata(&pdev->dev, uwire);
508 508
509 uwire->ck = clk_get(&pdev->dev, "armxor_ck"); 509 uwire->ck = clk_get(&pdev->dev, "fck");
510 if (!uwire->ck || IS_ERR(uwire->ck)) { 510 if (IS_ERR(uwire->ck)) {
511 dev_dbg(&pdev->dev, "no mpu_xor_clk ?\n"); 511 status = PTR_ERR(uwire->ck);
512 dev_dbg(&pdev->dev, "no functional clock?\n");
512 spi_master_put(master); 513 spi_master_put(master);
513 return -ENODEV; 514 return status;
514 } 515 }
515 clk_enable(uwire->ck); 516 clk_enable(uwire->ck);
516 517
diff --git a/drivers/spi/orion_spi.c b/drivers/spi/orion_spi.c
index 014becb7d530..c8b0babdc2a6 100644
--- a/drivers/spi/orion_spi.c
+++ b/drivers/spi/orion_spi.c
@@ -496,7 +496,7 @@ static int __init orion_spi_probe(struct platform_device *pdev)
496 } 496 }
497 497
498 if (!request_mem_region(r->start, (r->end - r->start) + 1, 498 if (!request_mem_region(r->start, (r->end - r->start) + 1,
499 pdev->dev.bus_id)) { 499 dev_name(&pdev->dev))) {
500 status = -EBUSY; 500 status = -EBUSY;
501 goto out; 501 goto out;
502 } 502 }
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index d0fc4ca2f656..33fcef3150d4 100644
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@ -34,8 +34,6 @@
34#include <asm/delay.h> 34#include <asm/delay.h>
35 35
36#include <mach/dma.h> 36#include <mach/dma.h>
37#include <mach/hardware.h>
38#include <mach/pxa-regs.h>
39#include <mach/regs-ssp.h> 37#include <mach/regs-ssp.h>
40#include <mach/ssp.h> 38#include <mach/ssp.h>
41#include <mach/pxa2xx_spi.h> 39#include <mach/pxa2xx_spi.h>
@@ -1333,7 +1331,7 @@ static int __init init_queue(struct driver_data *drv_data)
1333 1331
1334 INIT_WORK(&drv_data->pump_messages, pump_messages); 1332 INIT_WORK(&drv_data->pump_messages, pump_messages);
1335 drv_data->workqueue = create_singlethread_workqueue( 1333 drv_data->workqueue = create_singlethread_workqueue(
1336 drv_data->master->dev.parent->bus_id); 1334 dev_name(drv_data->master->dev.parent));
1337 if (drv_data->workqueue == NULL) 1335 if (drv_data->workqueue == NULL)
1338 return -EBUSY; 1336 return -EBUSY;
1339 1337
@@ -1462,7 +1460,7 @@ static int __init pxa2xx_spi_probe(struct platform_device *pdev)
1462 drv_data->mask_sr = SSSR_TINT | SSSR_RFS | SSSR_TFS | SSSR_ROR; 1460 drv_data->mask_sr = SSSR_TINT | SSSR_RFS | SSSR_TFS | SSSR_ROR;
1463 } 1461 }
1464 1462
1465 status = request_irq(ssp->irq, ssp_int, 0, dev->bus_id, drv_data); 1463 status = request_irq(ssp->irq, ssp_int, 0, dev_name(dev), drv_data);
1466 if (status < 0) { 1464 if (status < 0) {
1467 dev_err(&pdev->dev, "cannot get IRQ %d\n", ssp->irq); 1465 dev_err(&pdev->dev, "cannot get IRQ %d\n", ssp->irq);
1468 goto out_error_master_alloc; 1466 goto out_error_master_alloc;
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 7fea3cf4588a..3410b0c55ed2 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -1160,8 +1160,8 @@ static inline int init_queue(struct driver_data *drv_data)
1160 1160
1161 /* init messages workqueue */ 1161 /* init messages workqueue */
1162 INIT_WORK(&drv_data->pump_messages, pump_messages); 1162 INIT_WORK(&drv_data->pump_messages, pump_messages);
1163 drv_data->workqueue = 1163 drv_data->workqueue = create_singlethread_workqueue(
1164 create_singlethread_workqueue(drv_data->master->dev.parent->bus_id); 1164 dev_name(drv_data->master->dev.parent));
1165 if (drv_data->workqueue == NULL) 1165 if (drv_data->workqueue == NULL)
1166 return -EBUSY; 1166 return -EBUSY;
1167 1167
diff --git a/drivers/spi/spi_gpio.c b/drivers/spi/spi_gpio.c
index f5ed9721aabb..d2866c293dee 100644
--- a/drivers/spi/spi_gpio.c
+++ b/drivers/spi/spi_gpio.c
@@ -191,7 +191,7 @@ static int spi_gpio_setup(struct spi_device *spi)
191 return -EINVAL; 191 return -EINVAL;
192 192
193 if (!spi->controller_state) { 193 if (!spi->controller_state) {
194 status = gpio_request(cs, spi->dev.bus_id); 194 status = gpio_request(cs, dev_name(&spi->dev));
195 if (status) 195 if (status)
196 return status; 196 return status;
197 status = gpio_direction_output(cs, spi->mode & SPI_CS_HIGH); 197 status = gpio_direction_output(cs, spi->mode & SPI_CS_HIGH);
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index 269a55ec52ef..0480d8bb19d3 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -1381,7 +1381,7 @@ static int __init init_queue(struct driver_data *drv_data)
1381 1381
1382 INIT_WORK(&drv_data->work, pump_messages); 1382 INIT_WORK(&drv_data->work, pump_messages);
1383 drv_data->workqueue = create_singlethread_workqueue( 1383 drv_data->workqueue = create_singlethread_workqueue(
1384 drv_data->master->dev.parent->bus_id); 1384 dev_name(drv_data->master->dev.parent));
1385 if (drv_data->workqueue == NULL) 1385 if (drv_data->workqueue == NULL)
1386 return -EBUSY; 1386 return -EBUSY;
1387 1387
@@ -1525,7 +1525,8 @@ static int __init spi_imx_probe(struct platform_device *pdev)
1525 status = -ENODEV; 1525 status = -ENODEV;
1526 goto err_no_irqres; 1526 goto err_no_irqres;
1527 } 1527 }
1528 status = request_irq(irq, spi_int, IRQF_DISABLED, dev->bus_id, drv_data); 1528 status = request_irq(irq, spi_int, IRQF_DISABLED,
1529 dev_name(dev), drv_data);
1529 if (status < 0) { 1530 if (status < 0) {
1530 dev_err(&pdev->dev, "probe - cannot get IRQ (%d)\n", status); 1531 dev_err(&pdev->dev, "probe - cannot get IRQ (%d)\n", status);
1531 goto err_no_irqres; 1532 goto err_no_irqres;
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index ac0e3e4b3c54..44a2b46ccb79 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -637,7 +637,7 @@ static int __init mpc83xx_spi_probe(struct platform_device *dev)
637 INIT_LIST_HEAD(&mpc83xx_spi->queue); 637 INIT_LIST_HEAD(&mpc83xx_spi->queue);
638 638
639 mpc83xx_spi->workqueue = create_singlethread_workqueue( 639 mpc83xx_spi->workqueue = create_singlethread_workqueue(
640 master->dev.parent->bus_id); 640 dev_name(master->dev.parent));
641 if (mpc83xx_spi->workqueue == NULL) { 641 if (mpc83xx_spi->workqueue == NULL) {
642 ret = -EBUSY; 642 ret = -EBUSY;
643 goto free_irq; 643 goto free_irq;
@@ -649,7 +649,7 @@ static int __init mpc83xx_spi_probe(struct platform_device *dev)
649 649
650 printk(KERN_INFO 650 printk(KERN_INFO
651 "%s: MPC83xx SPI Controller driver at 0x%p (irq = %d)\n", 651 "%s: MPC83xx SPI Controller driver at 0x%p (irq = %d)\n",
652 dev->dev.bus_id, mpc83xx_spi->base, mpc83xx_spi->irq); 652 dev_name(&dev->dev), mpc83xx_spi->base, mpc83xx_spi->irq);
653 653
654 return ret; 654 return ret;
655 655
diff --git a/drivers/spi/spi_txx9.c b/drivers/spi/spi_txx9.c
index 2296f37ea3c6..29cbb065618a 100644
--- a/drivers/spi/spi_txx9.c
+++ b/drivers/spi/spi_txx9.c
@@ -404,7 +404,8 @@ static int __init txx9spi_probe(struct platform_device *dev)
404 if (ret) 404 if (ret)
405 goto exit; 405 goto exit;
406 406
407 c->workqueue = create_singlethread_workqueue(master->dev.parent->bus_id); 407 c->workqueue = create_singlethread_workqueue(
408 dev_name(master->dev.parent));
408 if (!c->workqueue) 409 if (!c->workqueue)
409 goto exit_busy; 410 goto exit_busy;
410 c->last_chipselect = -1; 411 c->last_chipselect = -1;