]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
serial: amba-pl011: fix build regression
authorArnd Bergmann <arnd@arndb.de>
Fri, 15 Nov 2024 10:59:54 +0000 (11:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Nov 2024 08:52:55 +0000 (09:52 +0100)
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: 2bcacc1c87ac ("serial: amba-pl011: Fix RX stall when DMA is used")
Cc: stable <stable@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202411140617.nkjeHhsK-lkp@intel.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20241115110021.744332-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c

index 2facdbcd73eb160d38c9a2e467c0bf2c6d64d6ac..fcba6c3b99d732015ec7cda31983dd077845b107 100644 (file)
@@ -1819,10 +1819,12 @@ static void pl011_unthrottle_rx(struct uart_port *port)
 
        pl011_write(uap->im, uap, REG_IMSC);
 
+#ifdef CONFIG_DMA_ENGINE
        if (uap->using_rx_dma) {
                uap->dmacr |= UART011_RXDMAE;
                pl011_write(uap->dmacr, uap, REG_DMACR);
        }
+#endif
 
        uart_port_unlock_irqrestore(&uap->port, flags);
 }