From patchwork Fri Mar 4 10:27:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 322 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:41:41 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs9932qah; Fri, 4 Mar 2011 02:27:39 -0800 (PST) Received: by 10.52.178.98 with SMTP id cx2mr600828vdc.222.1299234459177; Fri, 04 Mar 2011 02:27:39 -0800 (PST) Received: from mail-qy0-f178.google.com (mail-qy0-f178.google.com [209.85.216.178]) by mx.google.com with ESMTPS id m10si1980706vcs.181.2011.03.04.02.27.38 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 02:27:38 -0800 (PST) Received-SPF: neutral (google.com: 209.85.216.178 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.216.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.178 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) smtp.mail=linus.walleij@linaro.org Received: by qyk2 with SMTP id 2so1911029qyk.16 for ; Fri, 04 Mar 2011 02:27:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.116.129 with SMTP id m1mr330716qaq.134.1299234457759; Fri, 04 Mar 2011 02:27:37 -0800 (PST) Received: by 10.224.28.201 with HTTP; Fri, 4 Mar 2011 02:27:37 -0800 (PST) In-Reply-To: <1297350667-3652-1-git-send-email-linus.walleij@linaro.org> References: <1297350667-3652-1-git-send-email-linus.walleij@linaro.org> Date: Fri, 4 Mar 2011 11:27:37 +0100 Message-ID: Subject: Fwd: [PATCH 11/11] tmio_mmc: use dmaengine helpers, drop submit check From: Linus Walleij To: Patch Tracking ---------- Forwarded message ---------- From: Linus Walleij 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 Cc: Dan Williams , Ian Molton , Linus Walleij 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 ---  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 --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",