Message ID | 20200708125000.15659-6-johan@kernel.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | 8c6a223186a6c3fe7cd381ef7e1d60ea6fd8fd52 |
Headers | show |
Series | USB: serial: break and sysrq fixes and cleanups | expand |
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) {
Do not set the sysrq timestamp unless CONFIG_MAGIC_SYSRQ is enabled to avoid unnecessary per-character processing for consoles. Signed-off-by: Johan Hovold <johan@kernel.org> --- drivers/usb/serial/generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)