linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: Michael Williamson
	<michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>,
	Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>,
	Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
Subject: Re: [PATCH RFC] spi: spi-davinci: Fix DMA API usage in davinci
Date: Tue, 20 Mar 2012 16:23:34 +0000	[thread overview]
Message-ID: <20120320162335.65ACD3E2834@localhost> (raw)
In-Reply-To: <1332240009-2011-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>

On Tue, 20 Mar 2012 16:10:09 +0530, Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org> wrote:
> The driver uses NULL for dma_unmap_single instead of
> the struct device that the API expects.
> 
> Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
> ---
> I do not have the board ,untested.

Can someone with this hardware please test?

g.

> 
>  drivers/spi/spi-davinci.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c
> index 31bfba8..9b2901f 100644
> --- a/drivers/spi/spi-davinci.c
> +++ b/drivers/spi/spi-davinci.c
> @@ -653,7 +653,7 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
>  			dev_dbg(sdev, "Couldn't DMA map a %d bytes RX buffer\n",
>  								rx_buf_count);
>  			if (t->tx_buf)
> -				dma_unmap_single(NULL, t->tx_dma, t->len,
> +				dma_unmap_single(&spi->dev, t->tx_dma, t->len,
>  								DMA_TO_DEVICE);
>  			return -ENOMEM;
>  		}
> @@ -692,10 +692,10 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
>  	if (spicfg->io_type == SPI_IO_TYPE_DMA) {
>  
>  		if (t->tx_buf)
> -			dma_unmap_single(NULL, t->tx_dma, t->len,
> +			dma_unmap_single(&spi->dev, t->tx_dma, t->len,
>  								DMA_TO_DEVICE);
>  
> -		dma_unmap_single(NULL, t->rx_dma, rx_buf_count,
> +		dma_unmap_single(&spi->dev, t->rx_dma, rx_buf_count,
>  							DMA_FROM_DEVICE);
>  
>  		clear_io_bits(dspi->base + SPIINT, SPIINT_DMA_REQ_EN);
> -- 
> 1.7.1
> 
> 
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> spi-devel-general mailing list
> spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/spi-devel-general

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure

  parent reply	other threads:[~2012-03-20 16:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 10:40 [PATCH RFC] spi: spi-davinci: Fix DMA API usage in davinci Shubhrajyoti D
     [not found] ` <1332240009-2011-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-03-20 16:23   ` Grant Likely [this message]
2012-03-22 14:38     ` Nori, Sekhar
     [not found]       ` <DF0F476B391FA8409C78302C7BA518B631802D1C-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2012-03-22 16:01         ` Shubhrajyoti Datta
     [not found]           ` <CAM=Q2cvfDe8U+iReAG0N3Rv3k99BMzUoMAJWJ+8PzstZY0hZYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-24 16:59             ` Grant Likely

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=20120320162335.65ACD3E2834@localhost \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org \
    --cc=nsekhar-l0cyMroinI0@public.gmane.org \
    --cc=shubhrajyoti-l0cyMroinI0@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /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).