]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drivers/i2c/busses: use correct type for dma_map/unmap
authorWolfram Sang <wsa@the-dreams.de>
Mon, 21 Jul 2014 09:42:03 +0000 (11:42 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 1 Aug 2014 17:43:51 +0000 (19:43 +0200)
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
drivers/i2c/busses/i2c-at91.c

index 7033e9166d1f99d22b54662c2b13f541d48df397..79a68999a6962914f93106b4fc9154129b9071f0 100644 (file)
@@ -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);
 }
@@ -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;