Skip to content

Commit

Permalink
spi/spi_mpc8xxx: Do not use map_tx_dma to unmap rx_dma
Browse files Browse the repository at this point in the history
This fixes a typo were map_tx_dma is used instead of
map_rx_dma, casing the driver to unmap rx_dma when it
shouldn't.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Joakim Tjernlund authored and Grant Likely committed May 25, 2010
1 parent 0398fb7 commit 338ff29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi_mpc8xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ static void mpc8xxx_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi)

if (mspi->map_tx_dma)
dma_unmap_single(dev, mspi->tx_dma, t->len, DMA_TO_DEVICE);
if (mspi->map_tx_dma)
if (mspi->map_rx_dma)
dma_unmap_single(dev, mspi->rx_dma, t->len, DMA_FROM_DEVICE);
mspi->xfer_in_progress = NULL;
}
Expand Down

0 comments on commit 338ff29

Please sign in to comment.