Commit eec28d8e authored by Wolfram Sang's avatar Wolfram Sang Committed by Greg Kroah-Hartman

drivers/i2c/busses: use correct type for dma_map/unmap

commit 28772ac8 upstream.

dma_{un}map_* uses 'enum dma_data_direction' not 'enum dma_transfer_direction'.
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Acked-by: default avatarLudovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe1df3fb
...@@ -210,7 +210,7 @@ static void at91_twi_write_data_dma_callback(void *data) ...@@ -210,7 +210,7 @@ static void at91_twi_write_data_dma_callback(void *data)
struct at91_twi_dev *dev = (struct at91_twi_dev *)data; struct at91_twi_dev *dev = (struct at91_twi_dev *)data;
dma_unmap_single(dev->dev, sg_dma_address(&dev->dma.sg), dma_unmap_single(dev->dev, sg_dma_address(&dev->dma.sg),
dev->buf_len, DMA_MEM_TO_DEV); dev->buf_len, DMA_TO_DEVICE);
at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_STOP); at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_STOP);
} }
...@@ -289,7 +289,7 @@ static void at91_twi_read_data_dma_callback(void *data) ...@@ -289,7 +289,7 @@ static void at91_twi_read_data_dma_callback(void *data)
struct at91_twi_dev *dev = (struct at91_twi_dev *)data; struct at91_twi_dev *dev = (struct at91_twi_dev *)data;
dma_unmap_single(dev->dev, sg_dma_address(&dev->dma.sg), dma_unmap_single(dev->dev, sg_dma_address(&dev->dma.sg),
dev->buf_len, DMA_DEV_TO_MEM); dev->buf_len, DMA_FROM_DEVICE);
/* The last two bytes have to be read without using dma */ /* The last two bytes have to be read without using dma */
dev->buf += dev->buf_len - 2; dev->buf += dev->buf_len - 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment