From patchwork Thu Feb 10 15:11:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 546761 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1AFnCIa010987 for ; Thu, 10 Feb 2011 15:49:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756551Ab1BJPtX (ORCPT ); Thu, 10 Feb 2011 10:49:23 -0500 Received: from mail.df.lth.se ([194.47.250.12]:53476 "EHLO df.lth.se" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756531Ab1BJPtW (ORCPT ); Thu, 10 Feb 2011 10:49:22 -0500 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 10 Feb 2011 15:49:23 +0000 (UTC) X-Greylist: delayed 2559 seconds by postgrey-1.27 at vger.kernel.org; Thu, 10 Feb 2011 10:49:10 EST Received: from mer.df.lth.se (mer.df.lth.se [194.47.250.37]) by df.lth.se (8.14.2/8.13.7) with ESMTP id p1AFB89w013734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Feb 2011 16:11:08 +0100 (CET) Received: from mer.df.lth.se (triad@localhost.localdomain [127.0.0.1]) by mer.df.lth.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id p1AFB89e003905; Thu, 10 Feb 2011 16:11:08 +0100 Received: (from triad@localhost) by mer.df.lth.se (8.14.3/8.14.3/Submit) id p1AFB8mh003904; Thu, 10 Feb 2011 16:11:08 +0100 From: Linus Walleij To: linux-mmc@vger.kernel.org, Chris Ball Cc: Dan Williams , Ian Molton , Linus Walleij Subject: [PATCH 11/11] tmio_mmc: use dmaengine helpers, drop submit check Date: Thu, 10 Feb 2011 16:11:07 +0100 Message-Id: <1297350667-3652-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.7.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org 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", __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)