summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/imx.c
diff options
context:
space:
mode:
authorAndy Duan <fugang.duan@nxp.com>2017-03-20 16:04:15 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:26:02 +0800
commite81e7442ddcea220be6525bee2fde3d077e7df74 (patch)
tree5a5f03aa0eae3d64df2d91d66cc83accbcb134f9 /drivers/tty/serial/imx.c
parentd8d029b2c98a460c24dda0a7b34027d932dc5bdc (diff)
MLK-14498-6 tty: serial: imx: pass ->dev to dma_alloc_coherent() API
Pass ->dev to dma_alloc_coherent() API to avoid kernel dump. Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r--drivers/tty/serial/imx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 2df566288265..9019b6f06071 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1128,7 +1128,7 @@ static void imx_uart_dma_exit(struct imx_port *sport)
sport->dma_chan_rx = NULL;
if (sport->rx_buf.buf) {
- dma_free_coherent(NULL, IMX_RXBD_NUM * RX_BUF_SIZE,
+ dma_free_coherent(sport->port.dev, IMX_RXBD_NUM * RX_BUF_SIZE,
(void *)sport->rx_buf.buf,
sport->rx_buf.dmaaddr);
sport->rx_buf.buf = NULL;
@@ -1167,7 +1167,7 @@ static int imx_uart_dma_init(struct imx_port *sport)
goto err;
}
- sport->rx_buf.buf = dma_alloc_coherent(NULL, IMX_RXBD_NUM * RX_BUF_SIZE,
+ sport->rx_buf.buf = dma_alloc_coherent(sport->port.dev, IMX_RXBD_NUM * RX_BUF_SIZE,
&sport->rx_buf.dmaaddr, GFP_KERNEL);
if (!sport->rx_buf.buf) {
dev_err(dev, "cannot alloc DMA buffer.\n");