diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-04-23 15:49:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-27 17:43:47 -0400 |
commit | 507ca9bc0476662f3463888d583864834eab1e11 (patch) | |
tree | 421a373de235fcb4cb46a4723a1e9f00a71f709a /drivers/usb/serial/ipaq.c | |
parent | f4df0e334a9fc731689e8ba4f42a0d72a7491348 (diff) |
[PATCH] USB: add ability for usb-serial drivers to determine if their write urb is currently being used.
This removes a lot of racy and buggy code by trying to check the status of the urb.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/ipaq.c')
-rw-r--r-- | drivers/usb/serial/ipaq.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 3bd69c4ef24b..c05c2a2a0f31 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c | |||
@@ -818,11 +818,6 @@ static void ipaq_write_gather(struct usb_serial_port *port) | |||
818 | struct ipaq_packet *pkt, *tmp; | 818 | struct ipaq_packet *pkt, *tmp; |
819 | struct urb *urb = port->write_urb; | 819 | struct urb *urb = port->write_urb; |
820 | 820 | ||
821 | if (urb->status == -EINPROGRESS) { | ||
822 | /* Should never happen */ | ||
823 | err("%s - flushing while urb is active !", __FUNCTION__); | ||
824 | return; | ||
825 | } | ||
826 | room = URBDATA_SIZE; | 821 | room = URBDATA_SIZE; |
827 | list_for_each_entry_safe(pkt, tmp, &priv->queue, list) { | 822 | list_for_each_entry_safe(pkt, tmp, &priv->queue, list) { |
828 | count = min(room, (int)(pkt->len - pkt->written)); | 823 | count = min(room, (int)(pkt->len - pkt->written)); |