]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] USB: fix up URB_ASYNC_UNLINK usages from the usb-serial drivers
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Jul 2005 20:11:07 +0000 (16:11 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Sep 2005 23:27:55 +0000 (16:27 -0700)
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/keyspan.c
drivers/usb/serial/option.c

index fb0926292228b607c5faef3b4a08205f8b3b073d..3b958e60f5e8ee717513d3f0d35cb36c0425db94 100644 (file)
@@ -383,11 +383,8 @@ static int keyspan_write(struct usb_serial_port *port,
                dbg("%s - endpoint %d flip %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe), flip);
 
                if (this_urb->status == -EINPROGRESS) {
-                       if (this_urb->transfer_flags & URB_ASYNC_UNLINK)
-                               break;
                        if (time_before(jiffies, p_priv->tx_start_time[flip] + 10 * HZ))
                                break;
-                       this_urb->transfer_flags |= URB_ASYNC_UNLINK;
                        usb_unlink_urb(this_urb);
                        break;
                }
@@ -402,7 +399,6 @@ static int keyspan_write(struct usb_serial_port *port,
                /* send the data out the bulk port */
                this_urb->transfer_buffer_length = todo + dataOffset;
 
-               this_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
                this_urb->dev = port->serial->dev;
                if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
                        dbg("usb_submit_urb(write bulk) failed (%d)", err);
@@ -1119,10 +1115,8 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp)
 
 static inline void stop_urb(struct urb *urb)
 {
-       if (urb && urb->status == -EINPROGRESS) {
-               urb->transfer_flags &= ~URB_ASYNC_UNLINK;
+       if (urb && urb->status == -EINPROGRESS)
                usb_kill_urb(urb);
-       }
 }
 
 static void keyspan_close(struct usb_serial_port *port, struct file *filp)
index 4f985f43e79e859cbe8de3a989744c3d8b95955a..92d0f925d053c64326878afc14704b9d2877cdd7 100644 (file)
@@ -273,12 +273,9 @@ static int option_write(struct usb_serial_port *port,
 
                this_urb = portdata->out_urbs[i];
                if (this_urb->status == -EINPROGRESS) {
-                       if (this_urb->transfer_flags & URB_ASYNC_UNLINK)
-                               continue;
                        if (time_before(jiffies,
                                        portdata->tx_start_time[i] + 10 * HZ))
                                continue;
-                       this_urb->transfer_flags |= URB_ASYNC_UNLINK;
                        usb_unlink_urb(this_urb);
                        continue;
                }
@@ -293,7 +290,6 @@ static int option_write(struct usb_serial_port *port,
                memcpy (this_urb->transfer_buffer, buf, todo);
                this_urb->transfer_buffer_length = todo;
 
-               this_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
                this_urb->dev = port->serial->dev;
                err = usb_submit_urb(this_urb, GFP_ATOMIC);
                if (err) {
@@ -513,10 +509,8 @@ static int option_open(struct usb_serial_port *port, struct file *filp)
 
 static inline void stop_urb(struct urb *urb)
 {
-       if (urb && urb->status == -EINPROGRESS) {
-               urb->transfer_flags &= ~URB_ASYNC_UNLINK;
+       if (urb && urb->status == -EINPROGRESS)
                usb_kill_urb(urb);
-       }
 }
 
 static void option_close(struct usb_serial_port *port, struct file *filp)