serial: imx: use the dmaengine_tx_status
authorHuang Shijie <b32955@freescale.com>
Fri, 11 Oct 2013 10:31:01 +0000 (18:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Oct 2013 20:19:55 +0000 (13:19 -0700)
Use the dmaengine_tx_status to simplify the code, do not change any logic.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c

index cadf7e5848b2421c5b2d80bc39892ab809345a2e..13c2c2d09cacaef2b6ec36c6acff3ac7a1839dfa 100644 (file)
@@ -521,7 +521,7 @@ static void dma_tx_work(struct work_struct *w)
        unsigned long flags;
        int ret;
 
-       status = chan->device->device_tx_status(chan, (dma_cookie_t)0, NULL);
+       status = dmaengine_tx_status(chan, (dma_cookie_t)0, NULL);
        if (DMA_IN_PROGRESS == status)
                return;
 
@@ -926,7 +926,7 @@ static void dma_rx_callback(void *data)
        /* unmap it first */
        dma_unmap_sg(sport->port.dev, sgl, 1, DMA_FROM_DEVICE);
 
-       status = chan->device->device_tx_status(chan, (dma_cookie_t)0, &state);
+       status = dmaengine_tx_status(chan, (dma_cookie_t)0, &state);
        count = RX_BUF_SIZE - state.residue;
        dev_dbg(sport->port.dev, "We get %d bytes.\n", count);