diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2014-07-21 05:42:03 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-08-01 13:43:51 -0400 |
commit | 28772ac8711e4d7268c06e765887dd8cb6924f98 (patch) | |
tree | 50e72c438b238cb35a4a6d177913d66ca5457a5f | |
parent | 6d9fe5884e8dbf31a550316d924bea8c3ed155cf (diff) |
drivers/i2c/busses: use correct type for dma_map/unmap
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
-rw-r--r-- | drivers/i2c/busses/i2c-at91.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index 7033e9166d1f..79a68999a696 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c | |||
@@ -210,7 +210,7 @@ static void at91_twi_write_data_dma_callback(void *data) | |||
210 | struct at91_twi_dev *dev = (struct at91_twi_dev *)data; | 210 | struct at91_twi_dev *dev = (struct at91_twi_dev *)data; |
211 | 211 | ||
212 | dma_unmap_single(dev->dev, sg_dma_address(&dev->dma.sg), | 212 | dma_unmap_single(dev->dev, sg_dma_address(&dev->dma.sg), |
213 | dev->buf_len, DMA_MEM_TO_DEV); | 213 | dev->buf_len, DMA_TO_DEVICE); |
214 | 214 | ||
215 | at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_STOP); | 215 | at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_STOP); |
216 | } | 216 | } |
@@ -289,7 +289,7 @@ static void at91_twi_read_data_dma_callback(void *data) | |||
289 | struct at91_twi_dev *dev = (struct at91_twi_dev *)data; | 289 | struct at91_twi_dev *dev = (struct at91_twi_dev *)data; |
290 | 290 | ||
291 | dma_unmap_single(dev->dev, sg_dma_address(&dev->dma.sg), | 291 | dma_unmap_single(dev->dev, sg_dma_address(&dev->dma.sg), |
292 | dev->buf_len, DMA_DEV_TO_MEM); | 292 | dev->buf_len, DMA_FROM_DEVICE); |
293 | 293 | ||
294 | /* The last two bytes have to be read without using dma */ | 294 | /* The last two bytes have to be read without using dma */ |
295 | dev->buf += dev->buf_len - 2; | 295 | dev->buf += dev->buf_len - 2; |