diff options
| -rw-r--r-- | drivers/usb/serial/ch341.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 8f41d4385f1c..5343d65f3b52 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c | |||
| @@ -582,14 +582,23 @@ static int ch341_tiocmget(struct tty_struct *tty) | |||
| 582 | 582 | ||
| 583 | static int ch341_reset_resume(struct usb_serial *serial) | 583 | static int ch341_reset_resume(struct usb_serial *serial) |
| 584 | { | 584 | { |
| 585 | struct ch341_private *priv; | 585 | struct usb_serial_port *port = serial->port[0]; |
| 586 | 586 | struct ch341_private *priv = usb_get_serial_port_data(port); | |
| 587 | priv = usb_get_serial_port_data(serial->port[0]); | 587 | int ret; |
| 588 | 588 | ||
| 589 | /* reconfigure ch341 serial port after bus-reset */ | 589 | /* reconfigure ch341 serial port after bus-reset */ |
| 590 | ch341_configure(serial->dev, priv); | 590 | ch341_configure(serial->dev, priv); |
| 591 | 591 | ||
| 592 | return 0; | 592 | if (tty_port_initialized(&port->port)) { |
| 593 | ret = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO); | ||
| 594 | if (ret) { | ||
| 595 | dev_err(&port->dev, "failed to submit interrupt urb: %d\n", | ||
| 596 | ret); | ||
| 597 | return ret; | ||
| 598 | } | ||
| 599 | } | ||
| 600 | |||
| 601 | return usb_serial_generic_resume(serial); | ||
| 593 | } | 602 | } |
| 594 | 603 | ||
| 595 | static struct usb_serial_driver ch341_device = { | 604 | static struct usb_serial_driver ch341_device = { |
