summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2011-02-10 16:09:40 +0100
committerChris Ball <cjb@laptop.org>2011-03-15 13:49:12 -0400
commit9dc3fb5e4584630c50f7a5405efe9835d321ad44 (patch)
tree9e8e8a3758d3a08d6c4ff35ae0983674fbc4cb83 /drivers/mmc
parent1ed828dbb4a90f273b2a3cc70c9c28306427ea7c (diff)
downloadblackbird-op-linux-9dc3fb5e4584630c50f7a5405efe9835d321ad44.tar.gz
blackbird-op-linux-9dc3fb5e4584630c50f7a5405efe9835d321ad44.zip
mmc: sh_mmcif: unmap with the proper sglen
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> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sh_mmcif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 8e4aba90d6a4..61ad19ecfbf8 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);
OpenPOWER on IntegriCloud