From: Tony Lindgren Date: Tue, 21 Jun 2005 18:11:32 +0000 (-0700) Subject: ARM: OMAP: Changed dma-mapping direction for dma_unmap_sg X-Git-Tag: v2.6.13-omap1~111 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b8f02cd4d9b5a9d91e22baf158b506c86b0b065f;p=linux-2.6-omap-h63xx.git ARM: OMAP: Changed dma-mapping direction for dma_unmap_sg Fixed the wrong direction of dma-mapping flags as noted by David Brownell. --- 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);