From patchwork Thu Feb 10 15:10:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 546681 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 p1AFnCIX010987 for ; Thu, 10 Feb 2011 15:49:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756549Ab1BJPtT (ORCPT ); Thu, 10 Feb 2011 10:49:19 -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 S1756531Ab1BJPtT (ORCPT ); Thu, 10 Feb 2011 10:49:19 -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:22 +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 p1AFAwxX013727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Feb 2011 16:10:58 +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 p1AFAwil003648; Thu, 10 Feb 2011 16:10:58 +0100 Received: (from triad@localhost) by mer.df.lth.se (8.14.3/8.14.3/Submit) id p1AFAwbM003647; Thu, 10 Feb 2011 16:10:58 +0100 From: Linus Walleij To: linux-mmc@vger.kernel.org, Chris Ball Cc: Dan Williams , Ian Molton , Linus Walleij Subject: [PATCH 10/11] tmio_mmc: drop dma_sglen state variable Date: Thu, 10 Feb 2011 16:10:56 +0100 Message-Id: <1297350656-3392-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 5da2e17..708b3a1 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -152,7 +152,6 @@ struct tmio_mmc_host { struct tasklet_struct dma_complete; struct tasklet_struct dma_issue; #ifdef CONFIG_TMIO_MMC_DMA - unsigned int dma_sglen; u8 bounce_buf[PAGE_CACHE_SIZE] __attribute__((aligned(MAX_ALIGN))); struct scatterlist bounce_sg; #endif @@ -826,11 +825,9 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host) } ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_FROM_DEVICE); - if (ret > 0) { - host->dma_sglen = ret; + if (ret > 0) desc = chan->device->device_prep_slave_sg(chan, sg, ret, DMA_FROM_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); - } if (desc) { desc->callback = tmio_dma_complete; @@ -907,11 +904,9 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host) } ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_TO_DEVICE); - if (ret > 0) { - host->dma_sglen = ret; + if (ret > 0) desc = chan->device->device_prep_slave_sg(chan, sg, ret, DMA_TO_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); - } if (desc) { desc->callback = tmio_dma_complete;