diff options
author | Liang Li <liang.li@windriver.com> | 2013-01-23 23:31:27 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 11:52:23 -0500 |
commit | e8c5b56fdca7bb3006914f0bf7d09b4d64254172 (patch) | |
tree | 564fdae304ac7c4d2979d4387f7b9b09d3402baa /drivers/tty | |
parent | 58f82be334ede87aa6ff6fa1afdb05552be907be (diff) |
serial: pch_uart: fix sysrq handling for pch_uart
When PCH_UART_CONSOLE and SERIAL_CORE_CONSOLE is not set neither, the
uart_port will have no 'sysrq' member hence their will need a '#ifdef'
in pch_uart.c to handle the case, otherwise we'll see compile error
like this:
CC [M] drivers/tty/serial/pch_uart.o
drivers/tty/serial/pch_uart.c: In function 'pch_uart_hal_read':
drivers/tty/serial/pch_uart.c:572:11: error: 'struct uart_port' has no member named 'sysrq'
make[4]: *** [drivers/tty/serial/pch_uart.o] Error 1
Reported-by: Randy Dunlap <rdunlap@infradead.org>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Liang Li <liang.li@windriver.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/pch_uart.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index 1ddfc66b1084..7a6c989924b3 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c | |||
@@ -569,10 +569,12 @@ static int pch_uart_hal_read(struct eg20t_port *priv, unsigned char *buf, | |||
569 | if (uart_handle_break(port)) | 569 | if (uart_handle_break(port)) |
570 | continue; | 570 | continue; |
571 | } | 571 | } |
572 | #ifdef SUPPORT_SYSRQ | ||
572 | if (port->sysrq) { | 573 | if (port->sysrq) { |
573 | if (uart_handle_sysrq_char(port, rbr)) | 574 | if (uart_handle_sysrq_char(port, rbr)) |
574 | continue; | 575 | continue; |
575 | } | 576 | } |
577 | #endif | ||
576 | 578 | ||
577 | buf[i++] = rbr; | 579 | buf[i++] = rbr; |
578 | } | 580 | } |