summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/f81232.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2020-07-08 14:49:54 +0200
committerJohan Hovold <johan@kernel.org>2020-07-09 09:19:54 +0200
commit37ae231554f401104bf21847f9093d647a47faa4 (patch)
treef8d49b26c7a882f96dc3470bf8b8426f93cda877 /drivers/usb/serial/f81232.c
parent733fff67941dad64b8a630450b8372b1873edc41 (diff)
USB: serial: only set sysrq timestamp for consoles
Only set the sysrq timestamp for console ports to avoid having every driver also check the console flag when processing incoming data. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/f81232.c')
-rw-r--r--drivers/usb/serial/f81232.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c
index dcda7fb164b4..0c7eacc630e0 100644
--- a/drivers/usb/serial/f81232.c
+++ b/drivers/usb/serial/f81232.c
@@ -424,7 +424,7 @@ static void f81232_process_read_urb(struct urb *urb)
lsr = data[i];
tty_flag = f81232_handle_lsr(port, lsr);
- if (port->port.console && port->sysrq) {
+ if (port->sysrq) {
if (usb_serial_handle_sysrq_char(port, data[i + 1]))
continue;
}
@@ -461,7 +461,7 @@ static void f81534a_process_read_urb(struct urb *urb)
lsr = data[len - 1];
tty_flag = f81232_handle_lsr(port, lsr);
- if (port->port.console && port->sysrq) {
+ if (port->sysrq) {
for (i = 1; i < len - 1; ++i) {
if (!usb_serial_handle_sysrq_char(port, data[i])) {
tty_insert_flip_char(&port->port, data[i],