Re: [PATCH] drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Maintainers:

Please help check this patch, when you have time, thanks.

And now I find it is already fixed, but I still feel it can be
improved: "add defined(CONFIG_SERIAL_CORE_CONSOLE)".

Thanks.

-------- Original Message --------
Subject: [PATCH] drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq'
Date: Tue, 10 Dec 2013 13:21:49 +0800
From: Chen Gang <gang.chen.5i5j@xxxxxxxxx>
To: Jiri Slaby <jslaby@xxxxxxx>
CC: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>,  James Hogan <james.hogan@xxxxxxxxxx>, linux-serial@xxxxxxxxxxxxxxx

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@xxxxxxxxx>
---
 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



Thanks.
-- 
Chen Gang

Open, share and attitude like air, water and life which God blessed
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux