mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Simon Horman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
ac8f3bf883
commit
d09959e752
1 changed files with 1 additions and 1 deletions
|
|
@ -1437,7 +1437,7 @@ static void sci_request_dma(struct uart_port *port)
|
|||
sg_init_table(sg, 1);
|
||||
s->rx_buf[i] = buf;
|
||||
sg_dma_address(sg) = dma;
|
||||
sg->length = s->buf_len_rx;
|
||||
sg_dma_len(sg) = s->buf_len_rx;
|
||||
|
||||
buf += s->buf_len_rx;
|
||||
dma += s->buf_len_rx;
|
||||
|
|
|
|||
Loading…
Reference in a new issue