Commit 8c6a2231 authored by Johan Hovold's avatar Johan Hovold

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 37ae2315
...@@ -594,7 +594,7 @@ EXPORT_SYMBOL_GPL(usb_serial_handle_sysrq_char); ...@@ -594,7 +594,7 @@ EXPORT_SYMBOL_GPL(usb_serial_handle_sysrq_char);
int usb_serial_handle_break(struct usb_serial_port *port) 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; return 0;
if (!port->sysrq) { if (!port->sysrq) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment