From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: Greg KH <gregkh@linuxfoundation.org>,
James Hogan <james.hogan@imgtec.com>,
linux-serial@vger.kernel.org
Subject: [PATCH] drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq'
Date: Tue, 10 Dec 2013 13:21:49 +0800 [thread overview]
Message-ID: <52A6A4ED.60700@gmail.com> (raw)
Need check CONFIG_SERIAL_CORE_CONSOLE or SUPPORT_SYSRQ just like the
structure definiation has done. Or may cause compiling issue.
The related error (with allmodconfig for metag):
CC [M] drivers/tty/serial/xilinx_uartps.o
drivers/tty/serial/xilinx_uartps.c: In function 'xuartps_isr':
drivers/tty/serial/xilinx_uartps.c:247: error: 'struct uart_port' has no member named 'sysrq'
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
drivers/tty/serial/xilinx_uartps.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index e46e9f3..1501e6b 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -244,6 +244,7 @@ static irqreturn_t xuartps_isr(int irq, void *dev_id)
* uart_handle_sysrq_char() doesn't work if
* spinlocked, for some reason
*/
+#if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(SUPPORT_SYSRQ)
if (port->sysrq) {
spin_unlock(&port->lock);
if (uart_handle_sysrq_char(port,
@@ -253,7 +254,7 @@ static irqreturn_t xuartps_isr(int irq, void *dev_id)
}
spin_lock(&port->lock);
}
-
+#endif
port->icount.rx++;
if (isrstatus & XUARTPS_IXR_PARITY) {
--
1.7.7.6
next reply other threads:[~2013-12-10 5:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 5:21 Chen Gang [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-01-17 15:03 [PATCH] drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq' Chen Gang
2014-01-17 15:16 ` Greg KH
2014-01-18 9:25 ` Chen Gang
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=52A6A4ED.60700@gmail.com \
--to=gang.chen.5i5j@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=james.hogan@imgtec.com \
--cc=jslaby@suse.cz \
--cc=linux-serial@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.