summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-davinci.c
diff options
context:
space:
mode:
authorLinus Torvalds2012-04-13 21:17:45 +0200
committerLinus Torvalds2012-04-13 21:17:45 +0200
commitcf7d8a5550779486524f775c8cf4be9b91365d23 (patch)
tree0be1d7e7aebcedcd97e1ec9a1af3a190f45a20b4 /drivers/spi/spi-davinci.c
parentMerge tag 'srpt-srq-type' of git://git.kernel.org/pub/scm/linux/kernel/git/ro... (diff)
parentspi/imx: prevent NULL pointer dereference in spi_imx_probe() (diff)
downloadkernel-qcow2-linux-cf7d8a5550779486524f775c8cf4be9b91365d23.tar.gz
kernel-qcow2-linux-cf7d8a5550779486524f775c8cf4be9b91365d23.tar.xz
kernel-qcow2-linux-cf7d8a5550779486524f775c8cf4be9b91365d23.zip
Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6
Pull SPI bug fixes from Grant Likely: "Miscellaneous driver bug fixes. No major changes in this branch." * tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6: spi/imx: prevent NULL pointer dereference in spi_imx_probe() spi/imx: mark base member in spi_imx_data as __iomem spi/mpc83xx: fix NULL pdata dereference bug spi/davinci: Fix DMA API usage in davinci spi/pL022: include types.h to remove compilation warnings
Diffstat (limited to 'drivers/spi/spi-davinci.c')
-rw-r--r--drivers/spi/spi-davinci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c
index 31bfba805cf4..9b2901feaf78 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);