diff options
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-bcm63xx.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-coldfire-qspi.c | 5 | ||||
-rw-r--r-- | drivers/spi/spi-omap2-mcspi.c | 6 | ||||
-rw-r--r-- | drivers/spi/spi-pl022.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi-s3c64xx.c | 14 |
5 files changed, 14 insertions, 16 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index 6e25ef1bce91..ea0aaa3f13d0 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c | |||
@@ -438,7 +438,7 @@ out: | |||
438 | 438 | ||
439 | static int __devexit bcm63xx_spi_remove(struct platform_device *pdev) | 439 | static int __devexit bcm63xx_spi_remove(struct platform_device *pdev) |
440 | { | 440 | { |
441 | struct spi_master *master = platform_get_drvdata(pdev); | 441 | struct spi_master *master = spi_master_get(platform_get_drvdata(pdev)); |
442 | struct bcm63xx_spi *bs = spi_master_get_devdata(master); | 442 | struct bcm63xx_spi *bs = spi_master_get_devdata(master); |
443 | 443 | ||
444 | spi_unregister_master(master); | 444 | spi_unregister_master(master); |
@@ -452,6 +452,8 @@ static int __devexit bcm63xx_spi_remove(struct platform_device *pdev) | |||
452 | 452 | ||
453 | platform_set_drvdata(pdev, 0); | 453 | platform_set_drvdata(pdev, 0); |
454 | 454 | ||
455 | spi_master_put(master); | ||
456 | |||
455 | return 0; | 457 | return 0; |
456 | } | 458 | } |
457 | 459 | ||
diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c index b2d4b9e4e010..764bfee75920 100644 --- a/drivers/spi/spi-coldfire-qspi.c +++ b/drivers/spi/spi-coldfire-qspi.c | |||
@@ -533,7 +533,6 @@ static int __devexit mcfqspi_remove(struct platform_device *pdev) | |||
533 | iounmap(mcfqspi->iobase); | 533 | iounmap(mcfqspi->iobase); |
534 | release_mem_region(res->start, resource_size(res)); | 534 | release_mem_region(res->start, resource_size(res)); |
535 | spi_unregister_master(master); | 535 | spi_unregister_master(master); |
536 | spi_master_put(master); | ||
537 | 536 | ||
538 | return 0; | 537 | return 0; |
539 | } | 538 | } |
@@ -541,7 +540,7 @@ static int __devexit mcfqspi_remove(struct platform_device *pdev) | |||
541 | #ifdef CONFIG_PM_SLEEP | 540 | #ifdef CONFIG_PM_SLEEP |
542 | static int mcfqspi_suspend(struct device *dev) | 541 | static int mcfqspi_suspend(struct device *dev) |
543 | { | 542 | { |
544 | struct spi_master *master = spi_master_get(dev_get_drvdata(dev)); | 543 | struct spi_master *master = dev_get_drvdata(dev); |
545 | struct mcfqspi *mcfqspi = spi_master_get_devdata(master); | 544 | struct mcfqspi *mcfqspi = spi_master_get_devdata(master); |
546 | 545 | ||
547 | spi_master_suspend(master); | 546 | spi_master_suspend(master); |
@@ -553,7 +552,7 @@ static int mcfqspi_suspend(struct device *dev) | |||
553 | 552 | ||
554 | static int mcfqspi_resume(struct device *dev) | 553 | static int mcfqspi_resume(struct device *dev) |
555 | { | 554 | { |
556 | struct spi_master *master = spi_master_get(dev_get_drvdata(dev)); | 555 | struct spi_master *master = dev_get_drvdata(dev); |
557 | struct mcfqspi *mcfqspi = spi_master_get_devdata(master); | 556 | struct mcfqspi *mcfqspi = spi_master_get_devdata(master); |
558 | 557 | ||
559 | spi_master_resume(master); | 558 | spi_master_resume(master); |
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index bc4778175e34..b2fb141da375 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c | |||
@@ -1228,18 +1228,16 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev) | |||
1228 | 1228 | ||
1229 | status = spi_register_master(master); | 1229 | status = spi_register_master(master); |
1230 | if (status < 0) | 1230 | if (status < 0) |
1231 | goto err_spi_register; | 1231 | goto disable_pm; |
1232 | 1232 | ||
1233 | return status; | 1233 | return status; |
1234 | 1234 | ||
1235 | err_spi_register: | ||
1236 | spi_master_put(master); | ||
1237 | disable_pm: | 1235 | disable_pm: |
1238 | pm_runtime_disable(&pdev->dev); | 1236 | pm_runtime_disable(&pdev->dev); |
1239 | dma_chnl_free: | 1237 | dma_chnl_free: |
1240 | kfree(mcspi->dma_channels); | 1238 | kfree(mcspi->dma_channels); |
1241 | free_master: | 1239 | free_master: |
1242 | kfree(master); | 1240 | spi_master_put(master); |
1243 | platform_set_drvdata(pdev, NULL); | 1241 | platform_set_drvdata(pdev, NULL); |
1244 | return status; | 1242 | return status; |
1245 | } | 1243 | } |
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index aab518ec2bbc..6abbe23c39b4 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c | |||
@@ -2053,7 +2053,6 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id) | |||
2053 | printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n", | 2053 | printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n", |
2054 | adev->res.start, pl022->virtbase); | 2054 | adev->res.start, pl022->virtbase); |
2055 | 2055 | ||
2056 | pm_runtime_enable(dev); | ||
2057 | pm_runtime_resume(dev); | 2056 | pm_runtime_resume(dev); |
2058 | 2057 | ||
2059 | pl022->clk = clk_get(&adev->dev, NULL); | 2058 | pl022->clk = clk_get(&adev->dev, NULL); |
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 646a7657fe62..d1c8441f638c 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
@@ -826,7 +826,7 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata( | |||
826 | struct spi_device *spi) | 826 | struct spi_device *spi) |
827 | { | 827 | { |
828 | struct s3c64xx_spi_csinfo *cs; | 828 | struct s3c64xx_spi_csinfo *cs; |
829 | struct device_node *slave_np, *data_np; | 829 | struct device_node *slave_np, *data_np = NULL; |
830 | u32 fb_delay = 0; | 830 | u32 fb_delay = 0; |
831 | 831 | ||
832 | slave_np = spi->dev.of_node; | 832 | slave_np = spi->dev.of_node; |
@@ -1479,40 +1479,40 @@ static const struct dev_pm_ops s3c64xx_spi_pm = { | |||
1479 | s3c64xx_spi_runtime_resume, NULL) | 1479 | s3c64xx_spi_runtime_resume, NULL) |
1480 | }; | 1480 | }; |
1481 | 1481 | ||
1482 | struct s3c64xx_spi_port_config s3c2443_spi_port_config = { | 1482 | static struct s3c64xx_spi_port_config s3c2443_spi_port_config = { |
1483 | .fifo_lvl_mask = { 0x7f }, | 1483 | .fifo_lvl_mask = { 0x7f }, |
1484 | .rx_lvl_offset = 13, | 1484 | .rx_lvl_offset = 13, |
1485 | .tx_st_done = 21, | 1485 | .tx_st_done = 21, |
1486 | .high_speed = true, | 1486 | .high_speed = true, |
1487 | }; | 1487 | }; |
1488 | 1488 | ||
1489 | struct s3c64xx_spi_port_config s3c6410_spi_port_config = { | 1489 | static struct s3c64xx_spi_port_config s3c6410_spi_port_config = { |
1490 | .fifo_lvl_mask = { 0x7f, 0x7F }, | 1490 | .fifo_lvl_mask = { 0x7f, 0x7F }, |
1491 | .rx_lvl_offset = 13, | 1491 | .rx_lvl_offset = 13, |
1492 | .tx_st_done = 21, | 1492 | .tx_st_done = 21, |
1493 | }; | 1493 | }; |
1494 | 1494 | ||
1495 | struct s3c64xx_spi_port_config s5p64x0_spi_port_config = { | 1495 | static struct s3c64xx_spi_port_config s5p64x0_spi_port_config = { |
1496 | .fifo_lvl_mask = { 0x1ff, 0x7F }, | 1496 | .fifo_lvl_mask = { 0x1ff, 0x7F }, |
1497 | .rx_lvl_offset = 15, | 1497 | .rx_lvl_offset = 15, |
1498 | .tx_st_done = 25, | 1498 | .tx_st_done = 25, |
1499 | }; | 1499 | }; |
1500 | 1500 | ||
1501 | struct s3c64xx_spi_port_config s5pc100_spi_port_config = { | 1501 | static struct s3c64xx_spi_port_config s5pc100_spi_port_config = { |
1502 | .fifo_lvl_mask = { 0x7f, 0x7F }, | 1502 | .fifo_lvl_mask = { 0x7f, 0x7F }, |
1503 | .rx_lvl_offset = 13, | 1503 | .rx_lvl_offset = 13, |
1504 | .tx_st_done = 21, | 1504 | .tx_st_done = 21, |
1505 | .high_speed = true, | 1505 | .high_speed = true, |
1506 | }; | 1506 | }; |
1507 | 1507 | ||
1508 | struct s3c64xx_spi_port_config s5pv210_spi_port_config = { | 1508 | static struct s3c64xx_spi_port_config s5pv210_spi_port_config = { |
1509 | .fifo_lvl_mask = { 0x1ff, 0x7F }, | 1509 | .fifo_lvl_mask = { 0x1ff, 0x7F }, |
1510 | .rx_lvl_offset = 15, | 1510 | .rx_lvl_offset = 15, |
1511 | .tx_st_done = 25, | 1511 | .tx_st_done = 25, |
1512 | .high_speed = true, | 1512 | .high_speed = true, |
1513 | }; | 1513 | }; |
1514 | 1514 | ||
1515 | struct s3c64xx_spi_port_config exynos4_spi_port_config = { | 1515 | static struct s3c64xx_spi_port_config exynos4_spi_port_config = { |
1516 | .fifo_lvl_mask = { 0x1ff, 0x7F, 0x7F }, | 1516 | .fifo_lvl_mask = { 0x1ff, 0x7F, 0x7F }, |
1517 | .rx_lvl_offset = 15, | 1517 | .rx_lvl_offset = 15, |
1518 | .tx_st_done = 25, | 1518 | .tx_st_done = 25, |