From: Joakim Tjernlund Date: Mon, 17 May 2010 13:17:10 +0000 (+0000) Subject: spi/spi_mpc8xxx: Do not use map_tx_dma to unmap rx_dma X-Git-Tag: v2.6.35-rc1~266^2~14 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=338ff2982d969a8e09ca356552cb5022ad380766;p=pandora-kernel.git spi/spi_mpc8xxx: Do not use map_tx_dma to unmap rx_dma 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 Acked-by: Anton Vorontsov Signed-off-by: Grant Likely --- diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index 66517ce750f3..6e7aabe8db18 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c @@ -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; }