Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- drivers/spi/spi-omap2-mcspi.c | 77 +++++++++++++++++------------------
+ drivers/spi/spi-omap2-mcspi.c | 77 ++++++++++++++++++++----------------------
1 file changed, 38 insertions(+), 39 deletions(-)
-diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
-index 8e435da730996..cfb64e5a7d45d 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
-@@ -986,20 +986,12 @@ static int omap2_mcspi_setup_transfer(struct spi_device *spi,
+@@ -985,20 +985,12 @@ static int omap2_mcspi_setup_transfer(st
* Note that we currently allow DMA only if we get a channel
* for both rx and tx. Otherwise we'll do PIO for both rx and tx.
*/
mcspi_dma->dma_rx_ch_name);
if (IS_ERR(mcspi_dma->dma_rx)) {
ret = PTR_ERR(mcspi_dma->dma_rx);
-@@ -1007,7 +999,7 @@ static int omap2_mcspi_request_dma(struct spi_device *spi)
+@@ -1006,7 +998,7 @@ static int omap2_mcspi_request_dma(struc
goto no_dma;
}
mcspi_dma->dma_tx_ch_name);
if (IS_ERR(mcspi_dma->dma_tx)) {
ret = PTR_ERR(mcspi_dma->dma_tx);
-@@ -1016,20 +1008,40 @@ static int omap2_mcspi_request_dma(struct spi_device *spi)
+@@ -1015,20 +1007,40 @@ static int omap2_mcspi_request_dma(struc
mcspi_dma->dma_rx = NULL;
}
if (!cs) {
cs = kzalloc(sizeof *cs, GFP_KERNEL);
if (!cs)
-@@ -1054,13 +1066,6 @@ static int omap2_mcspi_setup(struct spi_device *spi)
+@@ -1053,13 +1065,6 @@ static int omap2_mcspi_setup(struct spi_
}
}
ret = pm_runtime_get_sync(mcspi->dev);
if (ret < 0) {
pm_runtime_put_noidle(mcspi->dev);
-@@ -1077,12 +1082,8 @@ static int omap2_mcspi_setup(struct spi_device *spi)
+@@ -1076,12 +1081,8 @@ static int omap2_mcspi_setup(struct spi_
static void omap2_mcspi_cleanup(struct spi_device *spi)
{
if (spi->controller_state) {
/* Unlink controller state from context save list */
cs = spi->controller_state;
-@@ -1091,19 +1092,6 @@ static void omap2_mcspi_cleanup(struct spi_device *spi)
+@@ -1090,19 +1091,6 @@ static void omap2_mcspi_cleanup(struct s
kfree(cs);
}
if (gpio_is_valid(spi->cs_gpio))
gpio_free(spi->cs_gpio);
}
-@@ -1314,6 +1302,9 @@ static bool omap2_mcspi_can_dma(struct spi_master *master,
+@@ -1313,6 +1301,9 @@ static bool omap2_mcspi_can_dma(struct s
if (spi_controller_is_slave(master))
return true;
return (xfer->len >= DMA_MIN_BYTES);
}
-@@ -1501,6 +1492,11 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
+@@ -1475,6 +1466,11 @@ static int omap2_mcspi_probe(struct plat
for (i = 0; i < master->num_chipselect; i++) {
sprintf(mcspi->dma_channels[i].dma_rx_ch_name, "rx%d", i);
sprintf(mcspi->dma_channels[i].dma_tx_ch_name, "tx%d", i);
}
status = platform_get_irq(pdev, 0);
-@@ -1538,6 +1534,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
+@@ -1512,6 +1508,7 @@ disable_pm:
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
free_master:
spi_master_put(master);
return status;
}
-@@ -1547,6 +1544,8 @@ static int omap2_mcspi_remove(struct platform_device *pdev)
+@@ -1521,6 +1518,8 @@ static int omap2_mcspi_remove(struct pla
struct spi_master *master = platform_get_drvdata(pdev);
struct omap2_mcspi *mcspi = spi_master_get_devdata(master);
pm_runtime_dont_use_autosuspend(mcspi->dev);
pm_runtime_put_sync(mcspi->dev);
pm_runtime_disable(&pdev->dev);
---
-2.20.1
-
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- drivers/spi/spi-omap2-mcspi.c | 77 +++++++++++++++++------------------
+ drivers/spi/spi-omap2-mcspi.c | 77 ++++++++++++++++++++----------------------
1 file changed, 38 insertions(+), 39 deletions(-)
-diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
-index e9bc9cf984d60..e9e256718ef4a 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
-@@ -975,20 +975,12 @@ static int omap2_mcspi_setup_transfer(struct spi_device *spi,
+@@ -974,20 +974,12 @@ static int omap2_mcspi_setup_transfer(st
* Note that we currently allow DMA only if we get a channel
* for both rx and tx. Otherwise we'll do PIO for both rx and tx.
*/
mcspi_dma->dma_rx_ch_name);
if (IS_ERR(mcspi_dma->dma_rx)) {
ret = PTR_ERR(mcspi_dma->dma_rx);
-@@ -996,7 +988,7 @@ static int omap2_mcspi_request_dma(struct spi_device *spi)
+@@ -995,7 +987,7 @@ static int omap2_mcspi_request_dma(struc
goto no_dma;
}
mcspi_dma->dma_tx_ch_name);
if (IS_ERR(mcspi_dma->dma_tx)) {
ret = PTR_ERR(mcspi_dma->dma_tx);
-@@ -1005,20 +997,40 @@ static int omap2_mcspi_request_dma(struct spi_device *spi)
+@@ -1004,20 +996,40 @@ static int omap2_mcspi_request_dma(struc
mcspi_dma->dma_rx = NULL;
}
if (!cs) {
cs = kzalloc(sizeof *cs, GFP_KERNEL);
if (!cs)
-@@ -1043,13 +1055,6 @@ static int omap2_mcspi_setup(struct spi_device *spi)
+@@ -1042,13 +1054,6 @@ static int omap2_mcspi_setup(struct spi_
}
}
ret = pm_runtime_get_sync(mcspi->dev);
if (ret < 0) {
pm_runtime_put_noidle(mcspi->dev);
-@@ -1066,12 +1071,8 @@ static int omap2_mcspi_setup(struct spi_device *spi)
+@@ -1065,12 +1070,8 @@ static int omap2_mcspi_setup(struct spi_
static void omap2_mcspi_cleanup(struct spi_device *spi)
{
if (spi->controller_state) {
/* Unlink controller state from context save list */
cs = spi->controller_state;
-@@ -1080,19 +1081,6 @@ static void omap2_mcspi_cleanup(struct spi_device *spi)
+@@ -1079,19 +1080,6 @@ static void omap2_mcspi_cleanup(struct s
kfree(cs);
}
if (gpio_is_valid(spi->cs_gpio))
gpio_free(spi->cs_gpio);
}
-@@ -1303,6 +1291,9 @@ static bool omap2_mcspi_can_dma(struct spi_master *master,
+@@ -1302,6 +1290,9 @@ static bool omap2_mcspi_can_dma(struct s
if (spi_controller_is_slave(master))
return true;
return (xfer->len >= DMA_MIN_BYTES);
}
-@@ -1490,6 +1481,11 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
+@@ -1464,6 +1455,11 @@ static int omap2_mcspi_probe(struct plat
for (i = 0; i < master->num_chipselect; i++) {
sprintf(mcspi->dma_channels[i].dma_rx_ch_name, "rx%d", i);
sprintf(mcspi->dma_channels[i].dma_tx_ch_name, "tx%d", i);
}
status = platform_get_irq(pdev, 0);
-@@ -1527,6 +1523,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
+@@ -1501,6 +1497,7 @@ disable_pm:
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
free_master:
spi_master_put(master);
return status;
}
-@@ -1536,6 +1533,8 @@ static int omap2_mcspi_remove(struct platform_device *pdev)
+@@ -1510,6 +1507,8 @@ static int omap2_mcspi_remove(struct pla
struct spi_master *master = platform_get_drvdata(pdev);
struct omap2_mcspi *mcspi = spi_master_get_devdata(master);
pm_runtime_dont_use_autosuspend(mcspi->dev);
pm_runtime_put_sync(mcspi->dev);
pm_runtime_disable(&pdev->dev);
---
-2.20.1
-