From patchwork Fri Mar 4 10:26:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 316 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:40 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs9888qah; Fri, 4 Mar 2011 02:26:44 -0800 (PST) Received: by 10.224.140.68 with SMTP id h4mr385436qau.54.1299234402379; Fri, 04 Mar 2011 02:26:42 -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 i34si4103956qck.172.2011.03.04.02.26.42 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 02:26:42 -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 mail-qy0-f178.google.com with SMTP id 2so1910265qyk.16 for ; Fri, 04 Mar 2011 02:26:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.33.82 with SMTP id g18mr341822qad.284.1299234402153; Fri, 04 Mar 2011 02:26:42 -0800 (PST) Received: by 10.224.28.201 with HTTP; Fri, 4 Mar 2011 02:26:42 -0800 (PST) In-Reply-To: <1297350600-2613-1-git-send-email-linus.walleij@linaro.org> References: <1297350600-2613-1-git-send-email-linus.walleij@linaro.org> Date: Fri, 4 Mar 2011 11:26:42 +0100 Message-ID: Subject: Fwd: [PATCH 07/11] sh_mmcif: use dmaengine helpers, drop submit check From: Linus Walleij To: Patch Tracking ---------- Forwarded message ---------- From: Linus Walleij Date: Thu, Feb 10, 2011 at 4:10 PM Subject: [PATCH 07/11] sh_mmcif: use dmaengine helpers, drop submit check To: linux-mmc@vger.kernel.org, Chris Ball Cc: Dan Williams , Paul Mundt , 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/sh_mmcif.c |   22 ++++++----------------  1 files changed, 6 insertions(+), 16 deletions(-)                __func__, host->data->sg_len, ret, cookie); @@ -277,14 +272,9 @@ static void sh_mmcif_start_dma_tx(struct sh_mmcif_host *host)        if (desc) {                desc->callback = mmcif_dma_complete;                desc->callback_param = host; -               cookie = desc->tx_submit(desc); -               if (cookie < 0) { -                       desc = NULL; -                       ret = cookie; -               } else { -                       sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAWEN); -                       chan->device->device_issue_pending(chan); -               } +               cookie = dmaengine_submit(desc); +               sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAWEN); +               dma_async_issue_pending(chan);        }        dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n",                __func__, host->data->sg_len, ret, cookie); -- 1.7.4 diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index e247031..aea8626 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)        if (desc) {                desc->callback = mmcif_dma_complete;                desc->callback_param = host; -               cookie = desc->tx_submit(desc); -               if (cookie < 0) { -                       desc = NULL; -                       ret = cookie; -               } else { -                       sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAREN); -                       chan->device->device_issue_pending(chan); -               } +               cookie = dmaengine_submit(desc); +               sh_mmcif_bitset(host, MMCIF_CE_BUF_ACC, BUF_ACC_DMAREN); +               dma_async_issue_pending(chan);        }        dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n",