All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 05/11] sh_mmcif: unmap with the proper sglen
@ 2011-02-10 15:09 Linus Walleij
  0 siblings, 0 replies; only message in thread
From: Linus Walleij @ 2011-02-10 15:09 UTC (permalink / raw)
  To: linux-mmc, Chris Ball; +Cc: Dan Williams, Paul Mundt, Linus Walleij

According to the DMA-API you shall unmap the sglists with the same
sglist length as passed into the mapping function, not the
returned value from the mapping function.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/mmc/host/sh_mmcif.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 8e4aba9..61ad19e 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -195,11 +195,11 @@ static void mmcif_dma_complete(void *arg)
 
 	if (host->data->flags & MMC_DATA_READ)
 		dma_unmap_sg(host->chan_rx->device->dev,
-			     host->data->sg, host->dma_sglen,
+			     host->data->sg, host->data->sg_len,
 			     DMA_FROM_DEVICE);
 	else
 		dma_unmap_sg(host->chan_tx->device->dev,
-			     host->data->sg, host->dma_sglen,
+			     host->data->sg, host->data->sg_len,
 			     DMA_TO_DEVICE);
 
 	complete(&host->dma_complete);
-- 
1.7.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-10 15:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 15:09 [PATCH 05/11] sh_mmcif: unmap with the proper sglen Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.