[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPDyKFqCBN1BT3O62-N9hL8ga0YgiOurkrnVOJqbTtVvtWZBuQ@mail.gmail.com>
Date: Mon, 20 Jul 2015 16:20:49 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Fabian Frederick <fabf@...net.be>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jarkko Lavinen <jarkko.lavinen@...ia.com>,
linux-omap <linux-omap@...r.kernel.org>,
linux-mmc <linux-mmc@...r.kernel.org>
Subject: Re: [PATCH 1/1 linux-next] mmc: omap: use for_each_sg() for
scatterlist parsing
On 16 June 2015 at 21:15, Fabian Frederick <fabf@...net.be> wrote:
> See Documentation/DMA-API.txt - Part Id
>
> Signed-off-by: Fabian Frederick <fabf@...net.be>
Thanks, applied!
Kind regards
Uffe
> ---
> This is untested.
>
> drivers/mmc/host/omap.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
> index 68dd6c7..70dcf07 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;
> }
> --
> 2.4.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists