diff options
-rw-r--r-- | drivers/spi/spi-omap2-mcspi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 0c73dd4f43a0..37ccdb796c9b 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c | |||
@@ -388,7 +388,8 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer) | |||
388 | 388 | ||
389 | if (tx != NULL) { | 389 | if (tx != NULL) { |
390 | wait_for_completion(&mcspi_dma->dma_tx_completion); | 390 | wait_for_completion(&mcspi_dma->dma_tx_completion); |
391 | dma_unmap_single(&spi->dev, xfer->tx_dma, count, DMA_TO_DEVICE); | 391 | dma_unmap_single(mcspi->dev, xfer->tx_dma, count, |
392 | DMA_TO_DEVICE); | ||
392 | 393 | ||
393 | /* for TX_ONLY mode, be sure all words have shifted out */ | 394 | /* for TX_ONLY mode, be sure all words have shifted out */ |
394 | if (rx == NULL) { | 395 | if (rx == NULL) { |
@@ -403,7 +404,8 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer) | |||
403 | 404 | ||
404 | if (rx != NULL) { | 405 | if (rx != NULL) { |
405 | wait_for_completion(&mcspi_dma->dma_rx_completion); | 406 | wait_for_completion(&mcspi_dma->dma_rx_completion); |
406 | dma_unmap_single(&spi->dev, xfer->rx_dma, count, DMA_FROM_DEVICE); | 407 | dma_unmap_single(mcspi->dev, xfer->rx_dma, count, |
408 | DMA_FROM_DEVICE); | ||
407 | omap2_mcspi_set_enable(spi, 0); | 409 | omap2_mcspi_set_enable(spi, 0); |
408 | 410 | ||
409 | if (l & OMAP2_MCSPI_CHCONF_TURBO) { | 411 | if (l & OMAP2_MCSPI_CHCONF_TURBO) { |