diff mbox

[11/11] tmio_mmc: use dmaengine helpers, drop submit check

Message ID AANLkTin_iW1-qH9R1WWpPP0aOr_E5z=sAdL9sgQQmKBi@mail.gmail.com
State Accepted, archived
Headers show

Commit Message

Linus Walleij March 4, 2011, 10:27 a.m. UTC
---------- Forwarded message ----------
From: Linus Walleij <linus.walleij@linaro.org>
Date: Thu, Feb 10, 2011 at 4:11 PM
Subject: [PATCH 11/11] tmio_mmc: use dmaengine helpers, drop submit check
To: linux-mmc@vger.kernel.org, Chris Ball <cjb@laptop.org>
Cc: Dan Williams <dan.j.williams@intel.com>, Ian Molton
<ian@mnementh.co.uk>, Linus Walleij <linus.walleij@linaro.org>


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>
---
 drivers/mmc/host/tmio_mmc.c |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

               __func__, host->sg_len, ret, cookie, host->mrq);
@@ -911,11 +906,7 @@ static void tmio_mmc_start_dma_tx(struct
tmio_mmc_host *host)
       if (desc) {
               desc->callback = tmio_dma_complete;
               desc->callback_param = host;
-               cookie = desc->tx_submit(desc);
-               if (cookie < 0) {
-                       desc = NULL;
-                       ret = cookie;
-               }
+               cookie = dmaengine_submit(desc);
       }
       dev_dbg(&host->pdev->dev, "%s(): mapped %d -> %d, cookie %d, rq %p\n",
               __func__, host->sg_len, ret, cookie, host->mrq);
@@ -959,7 +950,7 @@ static void tmio_issue_tasklet_fn(unsigned long priv)
       struct tmio_mmc_host *host = (struct tmio_mmc_host *)priv;
       struct dma_chan *chan = host->chan_tx;

-       chan->device->device_issue_pending(chan);
+       dma_async_issue_pending(chan);
 }

 static void tmio_tasklet_fn(unsigned long arg)
--
1.7.4
diff mbox

Patch

diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index 708b3a1..f729aea 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -832,13 +832,8 @@  static void tmio_mmc_start_dma_rx(struct
tmio_mmc_host *host)
       if (desc) {
               desc->callback = tmio_dma_complete;
               desc->callback_param = host;
-               cookie = desc->tx_submit(desc);
-               if (cookie < 0) {
-                       desc = NULL;
-                       ret = cookie;
-               } else {
-                       chan->device->device_issue_pending(chan);
-               }
+               cookie = dmaengine_submit(desc);
+               dma_async_issue_pending(chan);
       }
       dev_dbg(&host->pdev->dev, "%s(): mapped %d -> %d, cookie %d, rq %p\n",