summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorChanho Min <chanho.min@lge.com>2013-04-03 04:10:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-03 20:34:55 +0200
commit89fa28dbe0395ee06f3aacfe27655323ebad43d1 (patch)
treee29dbb82c493424f7ada982c1ee2e62ad5a8a493 /drivers/tty
parentMerge 3.9-rc5 into tty-next (diff)
downloadlinux-89fa28dbe0395ee06f3aacfe27655323ebad43d1.tar.xz
linux-89fa28dbe0395ee06f3aacfe27655323ebad43d1.zip
amba-pl011: fix build error if CONFIG_DMA_ENGINE is not enabled
Following patch will fix build error if CONFIG_DMA_ENGINE is unset. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Chanho Min <chanho.min@lge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/amba-pl011.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index b031abf43a7a..6cf861efb2af 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1195,6 +1195,7 @@ static void pl011_rx_chars(struct uart_amba_port *uap)
uap->im |= UART011_RXIM;
} else {
uap->im &= ~UART011_RXIM;
+#ifdef CONFIG_DMA_ENGINE
/* Start Rx DMA poll */
if (uap->dmarx.poll_rate) {
uap->dmarx.last_jiffies = jiffies;
@@ -1203,6 +1204,7 @@ static void pl011_rx_chars(struct uart_amba_port *uap)
jiffies +
msecs_to_jiffies(uap->dmarx.poll_rate));
}
+#endif
}
writew(uap->im, uap->port.membase + UART011_IMSC);
@@ -1665,11 +1667,13 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios,
*/
baud = uart_get_baud_rate(port, termios, old, 0,
port->uartclk / clkdiv);
+#ifdef CONFIG_DMA_ENGINE
/*
* Adjust RX DMA polling rate with baud rate if not specified.
*/
if (uap->dmarx.auto_poll_rate)
uap->dmarx.poll_rate = DIV_ROUND_UP(10000000, baud);
+#endif
if (baud > port->uartclk/16)
quot = DIV_ROUND_CLOSEST(port->uartclk * 8, baud);