diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2015-12-04 09:21:19 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-13 00:42:31 -0500 |
commit | d09959e7529451a1c302197fb1396ed5b835f6d3 (patch) | |
tree | 51ba48440151d1d1acb2eb1d8c7f21903f9c8995 /drivers | |
parent | ac8f3bf8832a405cc6e4dccb1d26d5cb2994d234 (diff) |
serial: sh-sci: Fix length of scatterlist
This patch fixes an issue that the "length" of scatterlist should be
set using sg_dma_len(). Otherwise, a dmaengine driver cannot work
correctly if CONFIG_NEED_SG_DMA_LENGTH=y.
Fixes: 7b39d90184 (serial: sh-sci: Fix NULL pointer dereference if HIGHMEM is enabled)
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 960e50a97558..51c7507b0444 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -1437,7 +1437,7 @@ static void sci_request_dma(struct uart_port *port) | |||
1437 | sg_init_table(sg, 1); | 1437 | sg_init_table(sg, 1); |
1438 | s->rx_buf[i] = buf; | 1438 | s->rx_buf[i] = buf; |
1439 | sg_dma_address(sg) = dma; | 1439 | sg_dma_address(sg) = dma; |
1440 | sg->length = s->buf_len_rx; | 1440 | sg_dma_len(sg) = s->buf_len_rx; |
1441 | 1441 | ||
1442 | buf += s->buf_len_rx; | 1442 | buf += s->buf_len_rx; |
1443 | dma += s->buf_len_rx; | 1443 | dma += s->buf_len_rx; |