summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2014-06-06 13:38:43 +0200
committerMark Brown <broonie@linaro.org>2014-07-07 12:55:20 +0200
commitafcc98dec91b7754e754670bdec0290aa07c3565 (patch)
tree71dc5c5dd226feea753613cb9ac979874c80ec79 /drivers/spi
parent95029a00886f0c8d79e700cb8983b881c75af0f1 (diff)
downloadlinux-afcc98dec91b7754e754670bdec0290aa07c3565.tar.gz
linux-afcc98dec91b7754e754670bdec0290aa07c3565.tar.bz2
linux-afcc98dec91b7754e754670bdec0290aa07c3565.zip
spi: rspi: Pass spi_master pointer to rspi_release_dma()
rspi_release_dma() doesn't need access to any fields in the driver private data, except for the pointer to the SPI master object. Hence just pass the needed pointer. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-rspi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index ddee9df1547d..38fd938d6360 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -926,19 +926,19 @@ static int rspi_request_dma(struct device *dev, struct spi_master *master,
return 0;
}
-static void rspi_release_dma(struct rspi_data *rspi)
+static void rspi_release_dma(struct spi_master *master)
{
- if (rspi->master->dma_tx)
- dma_release_channel(rspi->master->dma_tx);
- if (rspi->master->dma_rx)
- dma_release_channel(rspi->master->dma_rx);
+ if (master->dma_tx)
+ dma_release_channel(master->dma_tx);
+ if (master->dma_rx)
+ dma_release_channel(master->dma_rx);
}
static int rspi_remove(struct platform_device *pdev)
{
struct rspi_data *rspi = platform_get_drvdata(pdev);
- rspi_release_dma(rspi);
+ rspi_release_dma(rspi->master);
pm_runtime_disable(&pdev->dev);
return 0;
@@ -1140,7 +1140,7 @@ static int rspi_probe(struct platform_device *pdev)
return 0;
error3:
- rspi_release_dma(rspi);
+ rspi_release_dma(master);
error2:
pm_runtime_disable(&pdev->dev);
error1: