From b8f02cd4d9b5a9d91e22baf158b506c86b0b065f Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 21 Jun 2005 11:11:32 -0700 Subject: [PATCH] ARM: OMAP: Changed dma-mapping direction for dma_unmap_sg Fixed the wrong direction of dma-mapping flags as noted by David Brownell. --- drivers/mmc/omap.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c index 1c09a5b05da..2c034e8cc47 100644 --- a/drivers/mmc/omap.c +++ b/drivers/mmc/omap.c @@ -234,6 +234,8 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd) static void mmc_omap_xfer_done(struct mmc_omap_host *host, struct mmc_data *data) { + enum dma_data_direction dma_data_dir; + host->data = NULL; host->datadir = OMAP_MMC_DATADIR_NONE; @@ -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, - host->datadir); + dma_data_dir); + host->dma_len = 0; clk_unuse(host->clk); -- 2.41.1