mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] serial: pl011: Fix build breakage with !CONFIG_DMA_ENGINE
       [not found] <201411061551.b7jIlJ0U%fengguang.wu@intel.com>
@ 2014-11-06 14:06 ` Peter Hurley
  0 siblings, 0 replies; only message in thread
From: Peter Hurley @ 2014-11-06 14:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Fengguang Wu
  Cc: Stephen Rothwell, linux-kernel, linux-serial, Peter Hurley, Russell King

Commit 479e9b94fdce7bc4 ("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: Fengguang Wu <fengguang.wu@intel.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
 drivers/tty/serial/amba-pl011.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 8469b66..83c8f72 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
-- 
2.1.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-06 14:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <201411061551.b7jIlJ0U%fengguang.wu@intel.com>
2014-11-06 14:06 ` [PATCH] serial: pl011: Fix build breakage with !CONFIG_DMA_ENGINE Peter Hurley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome