aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/omap_hsmmc.c
diff options
context:
space:
mode:
authorPer Forlin <per.forlin@linaro.org>2011-06-17 14:14:21 -0400
committerChris Ball <cjb@laptop.org>2011-06-25 18:51:28 -0400
commita9120c33ffbb0b3448d833dae392edc90d6cfac2 (patch)
tree8ea12aea362f9e5980926c1f1b2faae1425bd67b /drivers/mmc/host/omap_hsmmc.c
parent4a3dc6ef344ccfe80bf986aec0b05f51af000720 (diff)
mmc: omap_hsmmc: use original sg_len for dma_unmap_sg
Don't use the returned sg_len from dma_map_sg() as inparameter to dma_unmap_sg(). Use the original sg_len for both dma_map_sg and dma_unmap_sg according to the documentation in DMA-API.txt. Signed-off-by: Per Forlin <per.forlin@linaro.org> Reviewed-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 8707bcdebc43..dedf3dab8a3b 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -961,7 +961,8 @@ static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno)
961 spin_unlock(&host->irq_lock); 961 spin_unlock(&host->irq_lock);
962 962
963 if (host->use_dma && dma_ch != -1) { 963 if (host->use_dma && dma_ch != -1) {
964 dma_unmap_sg(mmc_dev(host->mmc), host->data->sg, host->dma_len, 964 dma_unmap_sg(mmc_dev(host->mmc), host->data->sg,
965 host->data->sg_len,
965 omap_hsmmc_get_dma_dir(host, host->data)); 966 omap_hsmmc_get_dma_dir(host, host->data));
966 omap_free_dma(dma_ch); 967 omap_free_dma(dma_ch);
967 } 968 }
@@ -1345,7 +1346,7 @@ static void omap_hsmmc_dma_cb(int lch, u16 ch_status, void *cb_data)
1345 return; 1346 return;
1346 } 1347 }
1347 1348
1348 dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len, 1349 dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
1349 omap_hsmmc_get_dma_dir(host, data)); 1350 omap_hsmmc_get_dma_dir(host, data));
1350 1351
1351 req_in_progress = host->req_in_progress; 1352 req_in_progress = host->req_in_progress;