drivers/tty/serial: use correct type for dma_map/unmap
authorWolfram Sang <wsa@the-dreams.de>
Mon, 21 Jul 2014 09:42:04 +0000 (11:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jul 2014 23:34:33 +0000 (16:34 -0700)
dma_{un}map_* uses 'enum dma_data_direction' not 'enum dma_transfer_direction'.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/atmel_serial.c

index c4f75031410047351f5f17f09ad75f1697b001e7..7b63677475c1f0cc57f9a5f947d74d66cf9aad81 100644 (file)
@@ -706,7 +706,7 @@ static void atmel_release_tx_dma(struct uart_port *port)
                dmaengine_terminate_all(chan);
                dma_release_channel(chan);
                dma_unmap_sg(port->dev, &atmel_port->sg_tx, 1,
-                               DMA_MEM_TO_DEV);
+                               DMA_TO_DEVICE);
        }
 
        atmel_port->desc_tx = NULL;
@@ -804,7 +804,7 @@ static int atmel_prepare_tx_dma(struct uart_port *port)
        nent = dma_map_sg(port->dev,
                                &atmel_port->sg_tx,
                                1,
-                               DMA_MEM_TO_DEV);
+                               DMA_TO_DEVICE);
 
        if (!nent) {
                dev_dbg(port->dev, "need to release resource of dma\n");
@@ -883,7 +883,7 @@ static void atmel_release_rx_dma(struct uart_port *port)
                dmaengine_terminate_all(chan);
                dma_release_channel(chan);
                dma_unmap_sg(port->dev, &atmel_port->sg_rx, 1,
-                               DMA_DEV_TO_MEM);
+                               DMA_FROM_DEVICE);
        }
 
        atmel_port->desc_rx = NULL;
@@ -968,7 +968,7 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
                        nent = dma_map_sg(port->dev,
                                        &atmel_port->sg_rx,
                                        1,
-                                       DMA_DEV_TO_MEM);
+                                       DMA_FROM_DEVICE);
 
        if (!nent) {
                dev_dbg(port->dev, "need to release resource of dma\n");