Skip to content

Commit

Permalink
serial: imx: Use RX_BUF_SIZE to set size of RX buffer
Browse files Browse the repository at this point in the history
The imx serial driver uses PAGE_SIZE when allocating rx_buf, but then
uses RX_BUF_SIZE (which is currently defined as PAGE_SIZE) to describe
the length of the buffer when initialising the scatter gather list.

In order to ensure that this stays consistent, use RX_BUF_SIZE in both
locations.

Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Acked-by: Uwe Kleine-König <u.kleine-könig@pengtronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Martyn Welch authored and Greg Kroah-Hartman committed Oct 3, 2017
1 parent 4139fd7 commit f654b23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ static int imx_uart_dma_init(struct imx_port *sport)
goto err;
}

sport->rx_buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
sport->rx_buf = kzalloc(RX_BUF_SIZE, GFP_KERNEL);
if (!sport->rx_buf) {
ret = -ENOMEM;
goto err;
Expand Down

0 comments on commit f654b23

Please sign in to comment.