diff options
| -rw-r--r-- | drivers/spi/spi-rspi.c | 14 |
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, | |||
| 926 | return 0; | 926 | return 0; |
| 927 | } | 927 | } |
| 928 | 928 | ||
| 929 | static void rspi_release_dma(struct rspi_data *rspi) | 929 | static void rspi_release_dma(struct spi_master *master) |
| 930 | { | 930 | { |
| 931 | if (rspi->master->dma_tx) | 931 | if (master->dma_tx) |
| 932 | dma_release_channel(rspi->master->dma_tx); | 932 | dma_release_channel(master->dma_tx); |
| 933 | if (rspi->master->dma_rx) | 933 | if (master->dma_rx) |
| 934 | dma_release_channel(rspi->master->dma_rx); | 934 | dma_release_channel(master->dma_rx); |
| 935 | } | 935 | } |
| 936 | 936 | ||
| 937 | static int rspi_remove(struct platform_device *pdev) | 937 | static int rspi_remove(struct platform_device *pdev) |
| 938 | { | 938 | { |
| 939 | struct rspi_data *rspi = platform_get_drvdata(pdev); | 939 | struct rspi_data *rspi = platform_get_drvdata(pdev); |
| 940 | 940 | ||
| 941 | rspi_release_dma(rspi); | 941 | rspi_release_dma(rspi->master); |
| 942 | pm_runtime_disable(&pdev->dev); | 942 | pm_runtime_disable(&pdev->dev); |
| 943 | 943 | ||
| 944 | return 0; | 944 | return 0; |
| @@ -1140,7 +1140,7 @@ static int rspi_probe(struct platform_device *pdev) | |||
| 1140 | return 0; | 1140 | return 0; |
| 1141 | 1141 | ||
| 1142 | error3: | 1142 | error3: |
| 1143 | rspi_release_dma(rspi); | 1143 | rspi_release_dma(master); |
| 1144 | error2: | 1144 | error2: |
| 1145 | pm_runtime_disable(&pdev->dev); | 1145 | pm_runtime_disable(&pdev->dev); |
| 1146 | error1: | 1146 | error1: |
