提交 36f339d1 编写于 作者: P Peter Hurley 提交者: Greg Kroah-Hartman

serial: pl011: Fix build breakage with !CONFIG_DMA_ENGINE

Commit 479e9b94 ("serial: Refactor uart_flush_buffer() from
uart_close") refactored the uart_flush_buffer() in uart_close() into
those drivers that define a flush_buffer() method. However, in the
amba-pl011 driver configured without CONFIG_DMA_ENGINE, flush_buffer()
is a NULL method, so the direct call fails to compile.

Check and call the flush_buffer() method through the ops table instead.
Reported-by: NFengguang Wu <fengguang.wu@intel.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 085f4d84
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册