summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/generic.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2020-07-08 14:49:55 +0200
committerJohan Hovold <johan@kernel.org>2020-07-09 09:20:04 +0200
commit8c6a223186a6c3fe7cd381ef7e1d60ea6fd8fd52 (patch)
treeb21a006661534c923ab08376e51a7d4225c74350 /drivers/usb/serial/generic.c
parent37ae231554f401104bf21847f9093d647a47faa4 (diff)
downloadlinux-8c6a223186a6c3fe7cd381ef7e1d60ea6fd8fd52.tar.gz
linux-8c6a223186a6c3fe7cd381ef7e1d60ea6fd8fd52.tar.bz2
linux-8c6a223186a6c3fe7cd381ef7e1d60ea6fd8fd52.zip
USB: serial: only process sysrq when enabled
Do not set the sysrq timestamp unless CONFIG_MAGIC_SYSRQ is enabled to avoid unnecessary per-character processing for consoles. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r--drivers/usb/serial/generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 05a2a3aa3963..c5b35252c931 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -594,7 +594,7 @@ EXPORT_SYMBOL_GPL(usb_serial_handle_sysrq_char);
int usb_serial_handle_break(struct usb_serial_port *port)
{
- if (!port->port.console)
+ if (!port->port.console || !IS_ENABLED(CONFIG_MAGIC_SYSRQ))
return 0;
if (!port->sysrq) {