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>
This commit is contained in:
parent
37ae231554
commit
8c6a223186
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue