Skip to content

Commit

Permalink
drivers/i2c/busses: use correct type for dma_map/unmap
Browse files Browse the repository at this point in the history
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>
Cc: stable@kernel.org
  • Loading branch information
Wolfram Sang committed Aug 1, 2014
1 parent 6d9fe58 commit 28772ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/i2c/busses/i2c-at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,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);
}
Expand Down Expand Up @@ -289,7 +289,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;
Expand Down

0 comments on commit 28772ac

Please sign in to comment.