summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/omap_hsmmc.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-12-28 03:41:33 +0400
committerArnd Bergmann <arnd@arndb.de>2011-12-28 03:41:33 +0400
commit4551ae0a24bba06972247a80f721fc21f6b2b758 (patch)
tree7e17b819ba34f73988d384161335ebe5729897ad /drivers/mmc/host/omap_hsmmc.c
parente2c236f0a42fbb9e6a9528f8436f348218ffee96 (diff)
parent384703b8e6cd4c8ef08512e596024e028c91c339 (diff)
downloadlinux-4551ae0a24bba06972247a80f721fc21f6b2b758.tar.xz
Merge branch 'v3.2-rc6' into next/drivers
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index f0d792183b8e..d1fb561e089d 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1010,6 +1010,7 @@ static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno)
host->data->sg_len,
omap_hsmmc_get_dma_dir(host, host->data));
omap_free_dma(dma_ch);
+ host->data->host_cookie = 0;
}
host->data = NULL;
}
@@ -1575,8 +1576,10 @@ static void omap_hsmmc_post_req(struct mmc_host *mmc, struct mmc_request *mrq,
struct mmc_data *data = mrq->data;
if (host->use_dma) {
- dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
- omap_hsmmc_get_dma_dir(host, data));
+ if (data->host_cookie)
+ dma_unmap_sg(mmc_dev(host->mmc), data->sg,
+ data->sg_len,
+ omap_hsmmc_get_dma_dir(host, data));
data->host_cookie = 0;
}
}