/* This routine should not be called by a driver after its disconnect method has returned.  */
void usb_kill_anchored_urbs(struct usb_anchor *anchor)
/* This routine should not be called by a driver after its disconnect method has returned.  */
void usb_kill_anchored_urbs(struct usb_anchor *anchor)
{
	struct urb *victim;
	spin_lock_irq(&anchor->lock);
	while (!list_empty(&anchor->urb_list)) {
		victim = list_entry(anchor->urb_list.prev, struct urb,
				    anchor_list);
		usb_get_urb(victim);
		spin_unlock_irq(&anchor->lock);
		usb_kill_urb(victim);
		usb_put_urb(victim);
		spin_lock_irq(&anchor->lock);
	}
	spin_unlock_irq(&anchor->lock);
}