serial: mux: Align SUPPORT_SYSRQ behaviour with other drivers.
authorDaniel Thompson <daniel.thompson@linaro.org>
Fri, 28 Mar 2014 11:41:38 +0000 (11:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Apr 2014 23:13:01 +0000 (16:13 -0700)
The mux driver is anomalous among all the serial drivers that can
define SUPPORT_SYSRQ because it can, with some configs, set
SUPPORT_SYSRQ when SERIAL_CORE_CONSOLE is not set.

Not only does this impose a pointless (but tiny) runtime overhead for
such configs but, more significantly, it adds needless complexity when
doing a code review to check for unexpected side effects of any
changes to the serial core.

This is (cross-)compile tested only because I do not have any PA-RISC
hardware.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/mux.c

index 7fd6aaaacd8e530ee5355110ecdc48e1ab5d51d8..9b27d34ad49e9e8bad6589de0744021b9624fa7b 100644 (file)
@@ -29,7 +29,7 @@
 #include <asm/irq.h>
 #include <asm/parisc-device.h>
 
-#ifdef CONFIG_MAGIC_SYSRQ
+#if defined(CONFIG_SERIAL_MUX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 #include <linux/sysrq.h>
 #define SUPPORT_SYSRQ
 #endif