Am Montag, 14. April 2008 23:32:39 schrieb Greg KH:
This patch removes a creative abuse of in_interrupt(). Locking
is always done with a mutex now. No need for atomic operations.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
---
--- linux-2.6.25-rc7-work/drivers/net/usb/hso.c.alt2 2008-04-15 15:21:25.000000000 +0200
+++ linux-2.6.25-rc7-work/drivers/net/usb/hso.c 2008-04-15 15:29:17.000000000 +0200
@@ -2201,21 +2201,13 @@ static int hso_stop_serial_device(struct
return -ENODEV;
for (i = 0; i < serial->num_rx_urbs; i++) {
- if (serial->rx_urb[i]
- && (serial->rx_urb[i]->status == -EINPROGRESS)) {
- if (in_interrupt())
- usb_unlink_urb(serial->rx_urb[i]);
- else
+ if (serial->rx_urb[i])
usb_kill_urb(serial->rx_urb[i]);
- }
}
- if (serial->tx_urb && (serial->tx_urb->status == -EINPROGRESS)) {
- if (in_interrupt())
- usb_unlink_urb(serial->tx_urb);
- else
- usb_kill_urb(serial->rx_urb[i]);
- }
+ if (serial->tx_urb)
+ usb_kill_urb(serial->rx_urb[i]);
+
if (serial->shared_int) {
spin_lock_bh(&serial->shared_int->shared_int_lock);
if (serial->shared_int->use_count &&
@@ -2223,12 +2215,8 @@ static int hso_stop_serial_device(struct
struct urb *urb;
urb = serial->shared_int->shared_intr_urb;
- if ((urb) && (urb->status == -EINPROGRESS)) {
- if (in_interrupt())
- usb_unlink_urb(urb);
- else
- usb_kill_urb(urb);
- }
+ if (urb)
+ usb_kill_urb(urb);
}
spin_unlock_bh(&serial->shared_int->shared_int_lock);
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html