diff options
Diffstat (limited to 'drivers/usb/serial/generic.c')
| -rw-r--r-- | drivers/usb/serial/generic.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index ca92f67747cc..e6833e216fc9 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
| @@ -343,7 +343,7 @@ void usb_serial_generic_process_read_urb(struct urb *urb) | |||
| 343 | tty_insert_flip_string(tty, ch, urb->actual_length); | 343 | tty_insert_flip_string(tty, ch, urb->actual_length); |
| 344 | else { | 344 | else { |
| 345 | for (i = 0; i < urb->actual_length; i++, ch++) { | 345 | for (i = 0; i < urb->actual_length; i++, ch++) { |
| 346 | if (!usb_serial_handle_sysrq_char(tty, port, *ch)) | 346 | if (!usb_serial_handle_sysrq_char(port, *ch)) |
| 347 | tty_insert_flip_char(tty, *ch, TTY_NORMAL); | 347 | tty_insert_flip_char(tty, *ch, TTY_NORMAL); |
| 348 | } | 348 | } |
| 349 | } | 349 | } |
| @@ -448,12 +448,11 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty) | |||
| 448 | EXPORT_SYMBOL_GPL(usb_serial_generic_unthrottle); | 448 | EXPORT_SYMBOL_GPL(usb_serial_generic_unthrottle); |
| 449 | 449 | ||
| 450 | #ifdef CONFIG_MAGIC_SYSRQ | 450 | #ifdef CONFIG_MAGIC_SYSRQ |
| 451 | int usb_serial_handle_sysrq_char(struct tty_struct *tty, | 451 | int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch) |
| 452 | struct usb_serial_port *port, unsigned int ch) | ||
| 453 | { | 452 | { |
| 454 | if (port->sysrq && port->port.console) { | 453 | if (port->sysrq && port->port.console) { |
| 455 | if (ch && time_before(jiffies, port->sysrq)) { | 454 | if (ch && time_before(jiffies, port->sysrq)) { |
| 456 | handle_sysrq(ch, tty); | 455 | handle_sysrq(ch); |
| 457 | port->sysrq = 0; | 456 | port->sysrq = 0; |
| 458 | return 1; | 457 | return 1; |
| 459 | } | 458 | } |
| @@ -462,8 +461,7 @@ int usb_serial_handle_sysrq_char(struct tty_struct *tty, | |||
| 462 | return 0; | 461 | return 0; |
| 463 | } | 462 | } |
| 464 | #else | 463 | #else |
| 465 | int usb_serial_handle_sysrq_char(struct tty_struct *tty, | 464 | int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch) |
| 466 | struct usb_serial_port *port, unsigned int ch) | ||
| 467 | { | 465 | { |
| 468 | return 0; | 466 | return 0; |
| 469 | } | 467 | } |
| @@ -518,6 +516,7 @@ void usb_serial_generic_disconnect(struct usb_serial *serial) | |||
| 518 | for (i = 0; i < serial->num_ports; ++i) | 516 | for (i = 0; i < serial->num_ports; ++i) |
| 519 | generic_cleanup(serial->port[i]); | 517 | generic_cleanup(serial->port[i]); |
| 520 | } | 518 | } |
| 519 | EXPORT_SYMBOL_GPL(usb_serial_generic_disconnect); | ||
| 521 | 520 | ||
| 522 | void usb_serial_generic_release(struct usb_serial *serial) | 521 | void usb_serial_generic_release(struct usb_serial *serial) |
| 523 | { | 522 | { |
