serial: pch_uart: fix sysrq handling for pch_uart
Subsystems (2)
PATCH 1/1 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.odrivers/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
---
Hi Greg,
This is for 'tty-next' of your tty tree. Thanks.
drivers/tty/serial/pch_uart.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/tty/serial/pch_uart.c +2 -0
@@ -569,10 +569,12 @@ static int pch_uart_hal_read(struct eg20t_port *priv, unsigned char *buf,if (uart_handle_break (port))continue ; } +#ifdef SUPPORT_SYSRQ if (port->sysrq) {if (uart_handle_sysrq_char (port, rbr))continue ; } +#endif buf[i++] = rbr; }
Signature · 1 line
1.7.11.4
Quoted 5 lines · Liang Li
When
PCH_UART_CONSOLEandSERIAL_CORE_CONSOLEis not set neither, theuart_portwill have no 'sysrq' member hence their will need a '#ifdef' inpch_uart.cto handle the case, otherwise we'll see compile error like this:
Quoted 8 lines
CC [M]
drivers/tty/serial/pch_uart.odrivers/tty/serial/pch_uart.c: In function 'pch_uart_hal_read':drivers/tty/serial/pch_uart.c:572:11: error: 'structuart_port' has no member named 'sysrq' make[4]: *** [drivers/tty/serial/pch_uart.o] Error 1Reported-by Randy Dunlap <[email protected]>CC Stephen Rothwell <[email protected]>Signed-off-by Liang Li <[email protected]>
Thanks.
Quoted 26 lines
---
Hi Greg,This is for 'tty-next' of your tty tree. Thanks.
drivers/tty/serial/pch_uart.c | 2 ++ 1 file changed, 2 insertions(+)drivers/tty/serial/pch_uart.c +2
-0@@ -569,10 +569,12 @@ static int pch_uart_hal_read(struct eg20t_port *priv, unsigned char *buf,if (uart_handle_break (port))continue ; } +#ifdef SUPPORT_SYSRQ if (port->sysrq) {if (uart_handle_sysrq_char (port, rbr))continue ; } +#endif buf[i++] = rbr; }
Signature · 1 line
~Randy