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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {