linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: spi_mpc8xxx.c: Do not use map_tx_dma to unmap rx_dma
@ 2010-05-17 13:17 Joakim Tjernlund
       [not found] ` <1274102230-20828-1-git-send-email-Joakim.Tjernlund-SNLAxHN9vbcOP4wsBPIw7w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Joakim Tjernlund @ 2010-05-17 13:17 UTC (permalink / raw)
  To: Anton Vorontsov,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Joakim Tjernlund

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-SNLAxHN9vbcOP4wsBPIw7w@public.gmane.org>
---
 drivers/spi/spi_mpc8xxx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c
index c85dbbb..2d54020 100644
--- a/drivers/spi/spi_mpc8xxx.c
+++ b/drivers/spi/spi_mpc8xxx.c
@@ -514,7 +514,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;
 }
-- 
1.6.4.4


------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-22  5:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-17 13:17 [PATCH] spi: spi_mpc8xxx.c: Do not use map_tx_dma to unmap rx_dma Joakim Tjernlund
     [not found] ` <1274102230-20828-1-git-send-email-Joakim.Tjernlund-SNLAxHN9vbcOP4wsBPIw7w@public.gmane.org>
2010-05-17 13:22   ` Anton Vorontsov
     [not found]     ` <20100517132254.GA6567-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
2010-05-21 17:23       ` Joakim Tjernlund
     [not found]         ` <OFD8B30A94.BD9EA490-ONC125772A.005F631A-C125772A.005F8E73-SNLAxHN9vbcOP4wsBPIw7w@public.gmane.org>
2010-05-22  5:54           ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).