USB: remove references to port->port.count from the serial drivers
[pandora-kernel.git] / drivers / usb / serial / oti6858.c
index 8397334..deeacde 100644 (file)
@@ -585,9 +585,6 @@ static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port)
        usb_clear_halt(serial->dev, port->write_urb->pipe);
        usb_clear_halt(serial->dev, port->read_urb->pipe);
 
-       if (port->port.count != 1)
-               return 0;
-
        buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL);
        if (buf == NULL) {
                dev_err(&port->dev, "%s(): out of memory!\n", __func__);
@@ -934,10 +931,6 @@ static void oti6858_read_bulk_callback(struct urb *urb)
        spin_unlock_irqrestore(&priv->lock, flags);
 
        if (status != 0) {
-               if (!port->port.count) {
-                       dbg("%s(): port is closed, exiting", __func__);
-                       return;
-               }
                /*
                if (status == -EPROTO) {
                        * PL2303 mysteriously fails with -EPROTO reschedule
@@ -961,14 +954,12 @@ static void oti6858_read_bulk_callback(struct urb *urb)
        }
        tty_kref_put(tty);
 
-       /* schedule the interrupt urb if we are still open */
-       if (port->port.count != 0) {
-               port->interrupt_in_urb->dev = port->serial->dev;
-               result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
-               if (result != 0) {
-                       dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
-                                       " error %d\n", __func__, result);
-               }
+       /* schedule the interrupt urb */
+       port->interrupt_in_urb->dev = port->serial->dev;
+       result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
+       if (result != 0 && result != -EPERM) {
+               dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
+                               " error %d\n", __func__, result);
        }
 }