diff options
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/generic.c | 7 | ||||
-rw-r--r-- | drivers/usb/serial/pl2303.c | 2 | ||||
-rw-r--r-- | include/linux/usb/serial.h | 3 |
4 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 3dc3768ca71c..5f08702f672f 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -2121,7 +2121,7 @@ static void ftdi_process_read(struct work_struct *work) | |||
2121 | /* Note that the error flag is duplicated for | 2121 | /* Note that the error flag is duplicated for |
2122 | every character received since we don't know | 2122 | every character received since we don't know |
2123 | which character it applied to */ | 2123 | which character it applied to */ |
2124 | if (!usb_serial_handle_sysrq_char(port, | 2124 | if (!usb_serial_handle_sysrq_char(tty, port, |
2125 | data[packet_offset + i])) | 2125 | data[packet_offset + i])) |
2126 | tty_insert_flip_char(tty, | 2126 | tty_insert_flip_char(tty, |
2127 | data[packet_offset + i], | 2127 | data[packet_offset + i], |
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 3d8dc5671bea..ce57f6a32bdf 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -432,7 +432,7 @@ static void flush_and_resubmit_read_urb(struct usb_serial_port *port) | |||
432 | else { | 432 | else { |
433 | /* Push data to tty */ | 433 | /* Push data to tty */ |
434 | for (i = 0; i < urb->actual_length; i++, ch++) { | 434 | for (i = 0; i < urb->actual_length; i++, ch++) { |
435 | if (!usb_serial_handle_sysrq_char(port, *ch)) | 435 | if (!usb_serial_handle_sysrq_char(tty, port, *ch)) |
436 | tty_insert_flip_char(tty, *ch, TTY_NORMAL); | 436 | tty_insert_flip_char(tty, *ch, TTY_NORMAL); |
437 | } | 437 | } |
438 | } | 438 | } |
@@ -534,11 +534,12 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty) | |||
534 | } | 534 | } |
535 | } | 535 | } |
536 | 536 | ||
537 | int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch) | 537 | int usb_serial_handle_sysrq_char(struct tty_struct *tty, |
538 | struct usb_serial_port *port, unsigned int ch) | ||
538 | { | 539 | { |
539 | if (port->sysrq && port->console) { | 540 | if (port->sysrq && port->console) { |
540 | if (ch && time_before(jiffies, port->sysrq)) { | 541 | if (ch && time_before(jiffies, port->sysrq)) { |
541 | handle_sysrq(ch, tty_port_tty_get(&port->port)); | 542 | handle_sysrq(ch, tty); |
542 | port->sysrq = 0; | 543 | port->sysrq = 0; |
543 | return 1; | 544 | return 1; |
544 | } | 545 | } |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index ec6c132a25b5..8835802067f7 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -1038,7 +1038,7 @@ static void pl2303_read_bulk_callback(struct urb *urb) | |||
1038 | if (line_status & UART_OVERRUN_ERROR) | 1038 | if (line_status & UART_OVERRUN_ERROR) |
1039 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | 1039 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); |
1040 | for (i = 0; i < urb->actual_length; ++i) | 1040 | for (i = 0; i < urb->actual_length; ++i) |
1041 | if (!usb_serial_handle_sysrq_char(port, data[i])) | 1041 | if (!usb_serial_handle_sysrq_char(tty, port, data[i])) |
1042 | tty_insert_flip_char(tty, data[i], tty_flag); | 1042 | tty_insert_flip_char(tty, data[i], tty_flag); |
1043 | tty_flip_buffer_push(tty); | 1043 | tty_flip_buffer_push(tty); |
1044 | } | 1044 | } |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 44801d26a37a..0ec50ba62139 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -317,7 +317,8 @@ extern int usb_serial_generic_register(int debug); | |||
317 | extern void usb_serial_generic_deregister(void); | 317 | extern void usb_serial_generic_deregister(void); |
318 | extern void usb_serial_generic_resubmit_read_urb(struct usb_serial_port *port, | 318 | extern void usb_serial_generic_resubmit_read_urb(struct usb_serial_port *port, |
319 | gfp_t mem_flags); | 319 | gfp_t mem_flags); |
320 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, | 320 | extern int usb_serial_handle_sysrq_char(struct tty_struct *tty, |
321 | struct usb_serial_port *port, | ||
321 | unsigned int ch); | 322 | unsigned int ch); |
322 | extern int usb_serial_handle_break(struct usb_serial_port *port); | 323 | extern int usb_serial_handle_break(struct usb_serial_port *port); |
323 | 324 | ||