Skip to contentSkip to conversation

serial: pl011: Fix build breakage with !CONFIG_DMA_ENGINE

PATCH New Peter Hurley 1 participant 1 message Nov 6, 2014 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 201411061551.b7jIlJ0U%[email protected]

#1 lore raw

PATCH 1/1 serial: pl011: Fix build breakage with !CONFIG_DMA_ENGINE

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.

---
 drivers/tty/serial/amba-pl011.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/amba-pl011.c +2 -1
index 8469b66..83c8f72 100644
@@ -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
Signature · 1 line
2.1.3