Commit b8f02cd4 authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP: Changed dma-mapping direction for dma_unmap_sg

Fixed the wrong direction of dma-mapping flags as noted by
David Brownell.
parent ff4ce813
...@@ -234,6 +234,8 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd) ...@@ -234,6 +234,8 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd)
static void static void
mmc_omap_xfer_done(struct mmc_omap_host *host, struct mmc_data *data) mmc_omap_xfer_done(struct mmc_omap_host *host, struct mmc_data *data)
{ {
enum dma_data_direction dma_data_dir;
host->data = NULL; host->data = NULL;
host->datadir = OMAP_MMC_DATADIR_NONE; host->datadir = OMAP_MMC_DATADIR_NONE;
...@@ -250,8 +252,14 @@ mmc_omap_xfer_done(struct mmc_omap_host *host, struct mmc_data *data) ...@@ -250,8 +252,14 @@ mmc_omap_xfer_done(struct mmc_omap_host *host, struct mmc_data *data)
} }
} }
if (host->datadir == OMAP_MMC_DATADIR_WRITE)
dma_data_dir = DMA_TO_DEVICE;
else
dma_data_dir = DMA_FROM_DEVICE;
dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len, dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len,
host->datadir); dma_data_dir);
host->dma_len = 0; host->dma_len = 0;
clk_unuse(host->clk); clk_unuse(host->clk);
......
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