Skip to content

Commit 1baed36

Browse files
arndbgregkh
authored andcommitted
serial: amba-pl011: fix build regression
commit b5a23a6 upstream. When CONFIG_DMA_ENGINE is disabled, the driver now fails to build: drivers/tty/serial/amba-pl011.c: In function 'pl011_unthrottle_rx': drivers/tty/serial/amba-pl011.c:1822:16: error: 'struct uart_amba_port' has no member named 'using_rx_dma' 1822 | if (uap->using_rx_dma) { | ^~ drivers/tty/serial/amba-pl011.c:1823:20: error: 'struct uart_amba_port' has no member named 'dmacr' 1823 | uap->dmacr |= UART011_RXDMAE; | ^~ drivers/tty/serial/amba-pl011.c:1824:32: error: 'struct uart_amba_port' has no member named 'dmacr' 1824 | pl011_write(uap->dmacr, uap, REG_DMACR); | ^~ Add the missing #ifdef check around these field accesses, matching what other parts of this driver do. Fixes: 2bcacc1 ("serial: amba-pl011: Fix RX stall when DMA is used") Cc: stable <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5eb15d2 commit 1baed36

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/tty/serial/amba-pl011.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,10 +1837,12 @@ static void pl011_unthrottle_rx(struct uart_port *port)
18371837

18381838
pl011_write(uap->im, uap, REG_IMSC);
18391839

1840+
#ifdef CONFIG_DMA_ENGINE
18401841
if (uap->using_rx_dma) {
18411842
uap->dmacr |= UART011_RXDMAE;
18421843
pl011_write(uap->dmacr, uap, REG_DMACR);
18431844
}
1845+
#endif
18441846

18451847
uart_port_unlock_irqrestore(&uap->port, flags);
18461848
}

0 commit comments

Comments
 (0)