Commit a9120c33 authored by Per Forlin's avatar Per Forlin Committed by Chris Ball

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: default avatarPer Forlin <per.forlin@linaro.org>
Reviewed-by: default avatarVenkatraman S <svenkatr@ti.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 4a3dc6ef
...@@ -961,7 +961,8 @@ static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno) ...@@ -961,7 +961,8 @@ static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno)
spin_unlock(&host->irq_lock); spin_unlock(&host->irq_lock);
if (host->use_dma && dma_ch != -1) { if (host->use_dma && dma_ch != -1) {
dma_unmap_sg(mmc_dev(host->mmc), host->data->sg, host->dma_len, dma_unmap_sg(mmc_dev(host->mmc), host->data->sg,
host->data->sg_len,
omap_hsmmc_get_dma_dir(host, host->data)); omap_hsmmc_get_dma_dir(host, host->data));
omap_free_dma(dma_ch); omap_free_dma(dma_ch);
} }
...@@ -1345,7 +1346,7 @@ static void omap_hsmmc_dma_cb(int lch, u16 ch_status, void *cb_data) ...@@ -1345,7 +1346,7 @@ static void omap_hsmmc_dma_cb(int lch, u16 ch_status, void *cb_data)
return; return;
} }
dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len, dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
omap_hsmmc_get_dma_dir(host, data)); omap_hsmmc_get_dma_dir(host, data));
req_in_progress = host->req_in_progress; req_in_progress = host->req_in_progress;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment