linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: pch_uart: fix sysrq handling for pch_uart
@ 2013-01-24  4:31 Liang Li
  2013-01-25  0:07 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Liang Li @ 2013-01-24  4:31 UTC (permalink / raw)
  To: gregkh, linux-serial, linux-kernel; +Cc: liang.li, sfr, rdunlap, linux-next

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>
---
Hi Greg,

This is for 'tty-next' of your tty tree. Thanks.

 drivers/tty/serial/pch_uart.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index 1ddfc66..7a6c989 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,
 			if (uart_handle_break(port))
 				continue;
 		}
+#ifdef SUPPORT_SYSRQ
 		if (port->sysrq) {
 			if (uart_handle_sysrq_char(port, rbr))
 				continue;
 		}
+#endif
 
 		buf[i++] = rbr;
 	}
-- 
1.7.11.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] serial: pch_uart: fix sysrq handling for pch_uart
  2013-01-24  4:31 [PATCH] serial: pch_uart: fix sysrq handling for pch_uart Liang Li
@ 2013-01-25  0:07 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2013-01-25  0:07 UTC (permalink / raw)
  To: Liang Li; +Cc: gregkh, linux-serial, linux-kernel, sfr, linux-next

On 01/23/13 20:31, Liang Li wrote:
> 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>

Thanks.

> ---
> Hi Greg,
> 
> This is for 'tty-next' of your tty tree. Thanks.
> 
>  drivers/tty/serial/pch_uart.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
> index 1ddfc66..7a6c989 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,
>  			if (uart_handle_break(port))
>  				continue;
>  		}
> +#ifdef SUPPORT_SYSRQ
>  		if (port->sysrq) {
>  			if (uart_handle_sysrq_char(port, rbr))
>  				continue;
>  		}
> +#endif
>  
>  		buf[i++] = rbr;
>  	}
> 


-- 
~Randy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-25  0:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24  4:31 [PATCH] serial: pch_uart: fix sysrq handling for pch_uart Liang Li
2013-01-25  0:07 ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).