From: Liang Li <liang.li@windriver.com>
To: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: liang.li@windriver.com, sfr@canb.auug.org.au,
rdunlap@infradead.org, linux-next@vger.kernel.org
Subject: [PATCH] serial: pch_uart: fix sysrq handling for pch_uart
Date: Thu, 24 Jan 2013 12:31:27 +0800 [thread overview]
Message-ID: <1359001887-1016-1-git-send-email-liang.li@windriver.com> (raw)
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
next reply other threads:[~2013-01-24 4:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-24 4:31 Liang Li [this message]
2013-01-25 0:07 ` [PATCH] serial: pch_uart: fix sysrq handling for pch_uart Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1359001887-1016-1-git-send-email-liang.li@windriver.com \
--to=liang.li@windriver.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).