From: Jarkko Nikula <jarkko.nikula@bitmer.com>
To: linux-mmc@vger.kernel.org
Cc: Chris Ball <chris@printf.net>,
linux-omap@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Jarkko Nikula <jarkko.nikula@bitmer.com>
Subject: [RESEND 6/7] mmc: omap: Remove always set use_dma flag from struct mmc_omap_host
Date: Sat, 22 Feb 2014 18:01:42 +0200 [thread overview]
Message-ID: <1393084903-7194-7-git-send-email-jarkko.nikula@bitmer.com> (raw)
In-Reply-To: <1393084903-7194-1-git-send-email-jarkko.nikula@bitmer.com>
Because use_dma is set only in mmc_omap_probe and unset nowhere there is no
need to carry that flag in struct mmc_omap_host for mmc_omap_prepare_data
function.
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
drivers/mmc/host/omap.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index e4c7a0380a63..42175cd90435 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -152,7 +152,6 @@ struct mmc_omap_host {
u32 total_bytes_left;
unsigned features;
- unsigned use_dma:1;
unsigned brs_received:1, dma_done:1;
unsigned dma_in_use:1;
spinlock_t dma_lock;
@@ -944,7 +943,7 @@ static void
mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req)
{
struct mmc_data *data = req->data;
- int i, use_dma, block_size;
+ int i, use_dma = 1, block_size;
unsigned sg_len;
host->data = data;
@@ -969,13 +968,10 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req)
sg_len = (data->blocks == 1) ? 1 : data->sg_len;
/* Only do DMA for entire blocks */
- use_dma = host->use_dma;
- if (use_dma) {
- for (i = 0; i < sg_len; i++) {
- if ((data->sg[i].length % block_size) != 0) {
- use_dma = 0;
- break;
- }
+ for (i = 0; i < sg_len; i++) {
+ if ((data->sg[i].length % block_size) != 0) {
+ use_dma = 0;
+ break;
}
}
@@ -1369,7 +1365,6 @@ static int mmc_omap_probe(struct platform_device *pdev)
host->id = pdev->id;
host->irq = irq;
- host->use_dma = 1;
host->phys_base = res->start;
host->iclk = clk_get(&pdev->dev, "ick");
if (IS_ERR(host->iclk))
--
1.8.5.3
next prev parent reply other threads:[~2014-02-22 16:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-22 16:01 [RESEND 0/7] mmc: omap: Fixes, cleanup and add ERASE capability Jarkko Nikula
2014-02-22 16:01 ` [RESEND 1/7] mmc: omap: Fix NULL pointer dereference due uninitialized cover_tasklet Jarkko Nikula
2014-02-22 16:01 ` [RESEND 2/7] mmc: omap: Convert to devm_kzalloc Jarkko Nikula
2014-02-22 16:01 ` [RESEND 3/7] mmc: omap: Remove duplicate host->irq assignment Jarkko Nikula
2014-02-22 16:01 ` [RESEND 4/7] mmc: omap: Remove mem_res field from struct mmc_omap_host Jarkko Nikula
2014-02-22 16:01 ` [RESEND 5/7] mmc: omap: Convert to devm_ioremap_resource Jarkko Nikula
2014-02-22 16:01 ` Jarkko Nikula [this message]
2014-02-22 16:01 ` [RESEND 7/7] mmc: omap: Add erase capability Jarkko Nikula
2014-02-22 18:18 ` [RESEND 0/7] mmc: omap: Fixes, cleanup and add ERASE capability Chris Ball
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1393084903-7194-7-git-send-email-jarkko.nikula@bitmer.com \
--to=jarkko.nikula@bitmer.com \
--cc=aaro.koskinen@iki.fi \
--cc=chris@printf.net \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).