mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
drivers/i2c/busses: use correct type for dma_map/unmap
commit 28772ac871 upstream.
dma_{un}map_* uses 'enum dma_data_direction' not 'enum dma_transfer_direction'.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
30b72362ba
commit
b3a80775fa
@@ -211,7 +211,7 @@ static void at91_twi_write_data_dma_callback(void *data)
|
||||
struct at91_twi_dev *dev = (struct at91_twi_dev *)data;
|
||||
|
||||
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);
|
||||
}
|
||||
@@ -290,7 +290,7 @@ static void at91_twi_read_data_dma_callback(void *data)
|
||||
struct at91_twi_dev *dev = (struct at91_twi_dev *)data;
|
||||
|
||||
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 */
|
||||
dev->buf += dev->buf_len - 2;
|
||||
|
||||
Reference in New Issue
Block a user