aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-11-20 14:52:53 +0800
committerNicolas Ferre <nicolas.ferre@atmel.com>2010-11-30 17:23:24 +0100
commit214b574ab81236e7740243985d63a1d6a61231a2 (patch)
tree799104b78265cab4abfc3e5c73f12e2d0150dba1 /drivers/spi
parent82d5b5c8da769184a9bc2cc2adc90555f4aa90b0 (diff)
atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'
passing argument 2 of 'dma_map_single' discards qualifiers from pointer target type Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/atmel_spi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 154529aacc0..a067046c9da 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -352,8 +352,12 @@ atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer)
xfer->tx_dma = xfer->rx_dma = INVALID_DMA_ADDRESS;
if (xfer->tx_buf) {
+ /* tx_buf is a const void* where we need a void * for the dma
+ * mapping */
+ void *nonconst_tx = (void *)xfer->tx_buf;
+
xfer->tx_dma = dma_map_single(dev,
- (void *) xfer->tx_buf, xfer->len,
+ nonconst_tx, xfer->len,
DMA_TO_DEVICE);
if (dma_mapping_error(dev, xfer->tx_dma))
return -ENOMEM;