Skip to contentSkip to conversation

drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq'

PATCH New Chen Gang 1 participant 1 message Dec 10, 2013

Subsystems (2)
lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 drivers: tty: serial: xilinx_uartps: check related config macro before processing 'sysrq'

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'

---
 drivers/tty/serial/xilinx_uartps.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/tty/serial/xilinx_uartps.c +2 -1
index e46e9f3..1501e6b 100644
@@ -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) {
Signature · 1 line
1.7.7.6