diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-23 00:27:47 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-23 00:27:47 -0700 |
commit | b5f61ab96dd093c5190c1540fed14f71ed821ce7 (patch) | |
tree | 1098a64ec1aff8578f9094e59802a0533254f6aa /drivers/usb/atm/usbatm.c | |
parent | 47a227db746edbcfc8b78ac8a7787733faf6f171 (diff) | |
download | talos-obmc-linux-b5f61ab96dd093c5190c1540fed14f71ed821ce7.tar.gz talos-obmc-linux-b5f61ab96dd093c5190c1540fed14f71ed821ce7.zip |
usbatm: Use skb_queue_walk_safe() instead of by-hand implementation.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/usb/atm/usbatm.c')
-rw-r--r-- | drivers/usb/atm/usbatm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index 07228721cafe..0da2c25bab3b 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c @@ -640,14 +640,13 @@ static void usbatm_cancel_send(struct usbatm_data *instance, atm_dbg(instance, "%s entered\n", __func__); spin_lock_irq(&instance->sndqueue.lock); - for (skb = instance->sndqueue.next, n = skb->next; - skb != (struct sk_buff *)&instance->sndqueue; - skb = n, n = skb->next) + skb_queue_walk_safe(&instance->sndqueue, skb, n) { if (UDSL_SKB(skb)->atm.vcc == vcc) { atm_dbg(instance, "%s: popping skb 0x%p\n", __func__, skb); __skb_unlink(skb, &instance->sndqueue); usbatm_pop(vcc, skb); } + } spin_unlock_irq(&instance->sndqueue.lock); tasklet_disable(&instance->tx_channel.tasklet); |