diff options
author | Johan Hovold <johan@kernel.org> | 2020-07-08 14:49:55 +0200 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2020-07-09 09:20:04 +0200 |
commit | 8c6a223186a6c3fe7cd381ef7e1d60ea6fd8fd52 (patch) | |
tree | b21a006661534c923ab08376e51a7d4225c74350 /drivers | |
parent | 37ae231554f401104bf21847f9093d647a47faa4 (diff) | |
download | linux-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')
-rw-r--r-- | drivers/usb/serial/generic.c | 2 |
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) { |