1
0
Fork 0

serial: imx: Use RX_BUF_SIZE to set size of RX buffer

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>
hifive-unleashed-5.1
Martyn Welch 2017-09-28 11:07:40 +01:00 committed by Greg Kroah-Hartman
parent 4139fd76cd
commit f654b23c17
1 changed files with 1 additions and 1 deletions

View File

@ -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;