diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 8469b66ff832..83c8f721cdb2 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1689,7 +1689,8 @@ static void pl011_shutdown(struct uart_port *port) plat->exit(); } - pl011_dma_flush_buffer(port); + if (uap->port.ops->flush_buffer) + uap->port.ops->flush_buffer(port); } static void