spi: spi-imx: use correct enumeration type
authorStefan Agner <stefan@agner.ch>
Mon, 2 Mar 2015 23:28:31 +0000 (00:28 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 3 Mar 2015 09:58:24 +0000 (09:58 +0000)
The fourth argument of dmaengine_prep_slave_sg needs to be of the
enumeration type dma_transfer_direction instead of dma_data_direction.
Since the used enumeration values actually stay the same, this is not
an actual issue at runtime.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-imx.c

index 6fea4af51c413f27640c626ad61a2bcdca0b6bac..fe5ee3322a2498d0b890950e735ec4c82e20c695 100644 (file)
@@ -903,7 +903,7 @@ static int spi_imx_dma_transfer(struct spi_imx_data *spi_imx,
 
        if (tx) {
                desc_tx = dmaengine_prep_slave_sg(master->dma_tx,
-                                       tx->sgl, tx->nents, DMA_TO_DEVICE,
+                                       tx->sgl, tx->nents, DMA_MEM_TO_DEV,
                                        DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
                if (!desc_tx)
                        goto no_dma;
@@ -915,7 +915,7 @@ static int spi_imx_dma_transfer(struct spi_imx_data *spi_imx,
 
        if (rx) {
                desc_rx = dmaengine_prep_slave_sg(master->dma_rx,
-                                       rx->sgl, rx->nents, DMA_FROM_DEVICE,
+                                       rx->sgl, rx->nents, DMA_DEV_TO_MEM,
                                        DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
                if (!desc_rx)
                        goto no_dma;