]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
spi/s3c64xx: Fix compilation warning
authorJassi Brar <jassi.brar@samsung.com>
Fri, 3 Sep 2010 01:36:26 +0000 (10:36 +0900)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 8 Sep 2010 18:03:45 +0000 (12:03 -0600)
Fix compilation warning by typecasting the tx_buf pointer.

[I'm not thrilled with resorting to a cast; but I cannot see a better
way to go about this.  I don't want to drop the const from struct
spi_transfer ~~glikely]

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi_s3c64xx.c

index 8130f02dc466f57e65fa5b97d39fb69242cb8d1a..240b690a8a6f52f9d534cc1247e9d29d09d19fa0 100644 (file)
@@ -508,8 +508,9 @@ static int s3c64xx_spi_map_mssg(struct s3c64xx_spi_driver_data *sdd,
        list_for_each_entry(xfer, &msg->transfers, transfer_list) {
 
                if (xfer->tx_buf != NULL) {
-                       xfer->tx_dma = dma_map_single(dev, xfer->tx_buf,
-                                               xfer->len, DMA_TO_DEVICE);
+                       xfer->tx_dma = dma_map_single(dev,
+                                       (void *)xfer->tx_buf, xfer->len,
+                                       DMA_TO_DEVICE);
                        if (dma_mapping_error(dev, xfer->tx_dma)) {
                                dev_err(dev, "dma_map_single Tx failed\n");
                                xfer->tx_dma = XFER_DMAADDR_INVALID;