diff mbox

spi: spi-imx: use correct enumeration type

Message ID 1425338911-11407-1-git-send-email-stefan@agner.ch (mailing list archive)
State Accepted
Commit e8361f70a85c3ecd8d5b971d4d8abcbb0f8586de
Headers show

Commit Message

Stefan Agner March 2, 2015, 11:28 p.m. UTC
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>
---
This showed up when I tried using LLVM/clang to build a kernel for
a Freescale Vybrid based board.

 drivers/spi/spi-imx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Brown March 3, 2015, 9:58 a.m. UTC | #1
On Tue, Mar 03, 2015 at 12:28:31AM +0100, Stefan Agner wrote:
> 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.

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 961b97d..220f566 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -899,7 +899,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;
@@ -911,7 +911,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;