/* We need to be careful here, as dequeue() could be called in the middle. That's why we do the whole thing under the wa->xfer_list_lock. If dequeue() jumps in, it first locks urb->lock and then checks the list  */
void wa_urb_enqueue_run(struct work_struct *ws)
/* We need to be careful here, as dequeue() could be called in the middle. That's why we do the whole thing under the wa->xfer_list_lock. If dequeue() jumps in, it first locks urb->lock and then checks the list  */
void wa_urb_enqueue_run(struct work_struct *ws)
{
	struct wahc *wa = container_of(ws, struct wahc, xfer_work);
	struct wa_xfer *xfer, *next;
	struct urb *urb;
	spin_lock_irq(&wa->xfer_list_lock);
	list_for_each_entry_safe(xfer, next, &wa->xfer_delayed_list,
				 list_node) {
		list_del_init(&xfer->list_node);
		spin_unlock_irq(&wa->xfer_list_lock);
		urb = xfer->urb;
		wa_urb_enqueue_b(xfer);
		usb_put_urb(urb);
		spin_lock_irq(&wa->xfer_list_lock);
	}
	spin_unlock_irq(&wa->xfer_list_lock);
}