aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-22 23:18:47 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-22 23:18:47 -0400
commit83bfba5fca16d040bb78a24148da844db3de6a76 (patch)
treebd3d836fd53d0f5648991930c5e0b07ec871fd8c /drivers
parent953f551756a1275d9bfdbb70697323449305161a (diff)
usbnet: Use skb_queue_walk_safe() instead of by-hand implementation.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/usbnet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 8463efb9e0b1..02d25c743994 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -512,14 +512,13 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
512 int count = 0; 512 int count = 0;
513 513
514 spin_lock_irqsave (&q->lock, flags); 514 spin_lock_irqsave (&q->lock, flags);
515 for (skb = q->next; skb != (struct sk_buff *) q; skb = skbnext) { 515 skb_queue_walk_safe(q, skb, skbnext) {
516 struct skb_data *entry; 516 struct skb_data *entry;
517 struct urb *urb; 517 struct urb *urb;
518 int retval; 518 int retval;
519 519
520 entry = (struct skb_data *) skb->cb; 520 entry = (struct skb_data *) skb->cb;
521 urb = entry->urb; 521 urb = entry->urb;
522 skbnext = skb->next;
523 522
524 // during some PM-driven resume scenarios, 523 // during some PM-driven resume scenarios,
525 // these (async) unlinks complete immediately 524 // these (async) unlinks complete immediately