diff options
Diffstat (limited to 'drivers/usb/serial/oti6858.c')
-rw-r--r-- | drivers/usb/serial/oti6858.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index 839733431832..deeacdea05db 100644 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c | |||
@@ -585,9 +585,6 @@ static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
585 | usb_clear_halt(serial->dev, port->write_urb->pipe); | 585 | usb_clear_halt(serial->dev, port->write_urb->pipe); |
586 | usb_clear_halt(serial->dev, port->read_urb->pipe); | 586 | usb_clear_halt(serial->dev, port->read_urb->pipe); |
587 | 587 | ||
588 | if (port->port.count != 1) | ||
589 | return 0; | ||
590 | |||
591 | buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL); | 588 | buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL); |
592 | if (buf == NULL) { | 589 | if (buf == NULL) { |
593 | dev_err(&port->dev, "%s(): out of memory!\n", __func__); | 590 | dev_err(&port->dev, "%s(): out of memory!\n", __func__); |
@@ -934,10 +931,6 @@ static void oti6858_read_bulk_callback(struct urb *urb) | |||
934 | spin_unlock_irqrestore(&priv->lock, flags); | 931 | spin_unlock_irqrestore(&priv->lock, flags); |
935 | 932 | ||
936 | if (status != 0) { | 933 | if (status != 0) { |
937 | if (!port->port.count) { | ||
938 | dbg("%s(): port is closed, exiting", __func__); | ||
939 | return; | ||
940 | } | ||
941 | /* | 934 | /* |
942 | if (status == -EPROTO) { | 935 | if (status == -EPROTO) { |
943 | * PL2303 mysteriously fails with -EPROTO reschedule | 936 | * PL2303 mysteriously fails with -EPROTO reschedule |
@@ -961,14 +954,12 @@ static void oti6858_read_bulk_callback(struct urb *urb) | |||
961 | } | 954 | } |
962 | tty_kref_put(tty); | 955 | tty_kref_put(tty); |
963 | 956 | ||
964 | /* schedule the interrupt urb if we are still open */ | 957 | /* schedule the interrupt urb */ |
965 | if (port->port.count != 0) { | 958 | port->interrupt_in_urb->dev = port->serial->dev; |
966 | port->interrupt_in_urb->dev = port->serial->dev; | 959 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); |
967 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); | 960 | if (result != 0 && result != -EPERM) { |
968 | if (result != 0) { | 961 | dev_err(&port->dev, "%s(): usb_submit_urb() failed," |
969 | dev_err(&port->dev, "%s(): usb_submit_urb() failed," | 962 | " error %d\n", __func__, result); |
970 | " error %d\n", __func__, result); | ||
971 | } | ||
972 | } | 963 | } |
973 | } | 964 | } |
974 | 965 | ||