diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-06-16 21:15:15 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-08-17 11:32:42 +0200 |
commit | 8292adc6ba1d59fa227bcc43cec2ce207cbb588c (patch) | |
tree | bac69fd6bb68c66574f5f967ffd7e2072babeab8 /drivers/mmc/host/omap.c | |
parent | mmc: sdhci-of-arasan: add quirks for broken clock base (diff) | |
download | linux-8292adc6ba1d59fa227bcc43cec2ce207cbb588c.tar.xz linux-8292adc6ba1d59fa227bcc43cec2ce207cbb588c.zip |
mmc: omap: use for_each_sg() for scatterlist parsing
See Documentation/DMA-API.txt - Part Id
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/omap.c')
-rw-r--r-- | drivers/mmc/host/omap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 68dd6c79c378..70dcf074fbe3 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -948,6 +948,7 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req) { struct mmc_data *data = req->data; int i, use_dma = 1, block_size; + struct scatterlist *sg; unsigned sg_len; host->data = data; @@ -972,8 +973,8 @@ 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 */ - for (i = 0; i < sg_len; i++) { - if ((data->sg[i].length % block_size) != 0) { + for_each_sg(data->sg, sg, sg_len, i) { + if ((sg->length % block_size) != 0) { use_dma = 0; break; } |