aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2011-02-10 10:10:00 -0500
committerChris Ball <cjb@laptop.org>2011-03-15 13:49:16 -0400
commita5ece7d29d09714a690f83f6f0ce395f4374021e (patch)
tree798af18294cad483562746b72bcaf56b1e27f33f
parentf38f94c6b226f7c6888bedbcadf0ed2ddca7d029 (diff)
mmc: sh_mmcif: use dmaengine helpers, drop submit check
Use the new dmaengine helper functions, and drop the error check on the returned cookier from the dmaengine - we recently established that this is really not allowed to fail. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/host/sh_mmcif.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index e247031f91f7..aea86262ed66 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -224,14 +224,9 @@ static void sh_mmcif_start_dma_rx(struct sh_mmcif_host *host)
224 if (desc) { 224 if (desc) {
225 desc->callback = mmcif_dma_complete; 225 desc->callback = mmcif_dma_complete;
226 desc->callback_param = host; 226 desc->callback_param = host;
227 cookie = desc->tx_submit(desc); 227 cookie = dmaengine_submit(desc);
228 if (cookie < 0) { 228 sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAREN);
229 desc = NULL; 229 dma_async_issue_pending(chan);
230 ret = cookie;
231 } else {
232 sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAREN);
233 chan->device->device_issue_pending(chan);
234 }
235 } 230 }
236 dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n", 231 dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n",
237 __func__, host->data->sg_len, ret, cookie); 232 __func__, host->data->sg_len, ret, cookie);
@@ -277,14 +272,9 @@ static void sh_mmcif_start_dma_tx(struct sh_mmcif_host *host)
277 if (desc) { 272 if (desc) {
278 desc->callback = mmcif_dma_complete; 273 desc->callback = mmcif_dma_complete;
279 desc->callback_param = host; 274 desc->callback_param = host;
280 cookie = desc->tx_submit(desc); 275 cookie = dmaengine_submit(desc);
281 if (cookie < 0) { 276 sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAWEN);
282 desc = NULL; 277 dma_async_issue_pending(chan);
283 ret = cookie;
284 } else {
285 sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAWEN);
286 chan->device->device_issue_pending(chan);
287 }
288 } 278 }
289 dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n", 279 dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n",
290 __func__, host->data->sg_len, ret, cookie); 280 __func__, host->data->sg_len, ret, cookie);