diff options
author | Jarkko Nikula <jarkko.nikula@bitmer.com> | 2014-02-22 11:01:42 -0500 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2014-02-22 13:17:36 -0500 |
commit | a6c668fb95ac655fe94c08c1fb419f685040cf23 (patch) | |
tree | 595d4ac7137817c49ba8b86abcff245d306251bb /drivers/mmc/host/omap.c | |
parent | 64ac16ec80bc5aacdc2549226f2c0d48d185123c (diff) |
mmc: omap: Remove always set use_dma flag from struct mmc_omap_host
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>
Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc/host/omap.c')
-rw-r--r-- | drivers/mmc/host/omap.c | 15 |
1 files 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 { | |||
152 | u32 total_bytes_left; | 152 | u32 total_bytes_left; |
153 | 153 | ||
154 | unsigned features; | 154 | unsigned features; |
155 | unsigned use_dma:1; | ||
156 | unsigned brs_received:1, dma_done:1; | 155 | unsigned brs_received:1, dma_done:1; |
157 | unsigned dma_in_use:1; | 156 | unsigned dma_in_use:1; |
158 | spinlock_t dma_lock; | 157 | spinlock_t dma_lock; |
@@ -944,7 +943,7 @@ static void | |||
944 | mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req) | 943 | mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req) |
945 | { | 944 | { |
946 | struct mmc_data *data = req->data; | 945 | struct mmc_data *data = req->data; |
947 | int i, use_dma, block_size; | 946 | int i, use_dma = 1, block_size; |
948 | unsigned sg_len; | 947 | unsigned sg_len; |
949 | 948 | ||
950 | host->data = data; | 949 | host->data = data; |
@@ -969,13 +968,10 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req) | |||
969 | sg_len = (data->blocks == 1) ? 1 : data->sg_len; | 968 | sg_len = (data->blocks == 1) ? 1 : data->sg_len; |
970 | 969 | ||
971 | /* Only do DMA for entire blocks */ | 970 | /* Only do DMA for entire blocks */ |
972 | use_dma = host->use_dma; | 971 | for (i = 0; i < sg_len; i++) { |
973 | if (use_dma) { | 972 | if ((data->sg[i].length % block_size) != 0) { |
974 | for (i = 0; i < sg_len; i++) { | 973 | use_dma = 0; |
975 | if ((data->sg[i].length % block_size) != 0) { | 974 | break; |
976 | use_dma = 0; | ||
977 | break; | ||
978 | } | ||
979 | } | 975 | } |
980 | } | 976 | } |
981 | 977 | ||
@@ -1369,7 +1365,6 @@ static int mmc_omap_probe(struct platform_device *pdev) | |||
1369 | 1365 | ||
1370 | host->id = pdev->id; | 1366 | host->id = pdev->id; |
1371 | host->irq = irq; | 1367 | host->irq = irq; |
1372 | host->use_dma = 1; | ||
1373 | host->phys_base = res->start; | 1368 | host->phys_base = res->start; |
1374 | host->iclk = clk_get(&pdev->dev, "ick"); | 1369 | host->iclk = clk_get(&pdev->dev, "ick"); |
1375 | if (IS_ERR(host->iclk)) | 1370 | if (IS_ERR(host->iclk)) |