From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [PATCH RFC] spi: spi-davinci: Fix DMA API usage in davinci Date: Tue, 20 Mar 2012 16:23:34 +0000 Message-ID: <20120320162335.65ACD3E2834@localhost> References: <1332240009-2011-1-git-send-email-shubhrajyoti@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Michael Williamson , Sekhar Nori , Shubhrajyoti D To: Shubhrajyoti D , spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: In-Reply-To: <1332240009-2011-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Tue, 20 Mar 2012 16:10:09 +0530, Shubhrajyoti D wrote: > The driver uses NULL for dma_unmap_single instead of > the struct device that the API expects. > > Signed-off-by: Shubhrajyoti D > --- > 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