Commit f011fefa authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: octeon-usb: use list_for_each_entry_safe()

Use list_for_each_entry_safe() when deleting all list items.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 244544a1
......@@ -3223,13 +3223,14 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
static void octeon_usb_urb_dequeue_work(unsigned long arg)
{
struct urb *urb;
struct urb *next;
unsigned long flags;
struct octeon_hcd *priv = (struct octeon_hcd *)arg;
spin_lock_irqsave(&priv->lock, flags);
while (!list_empty(&priv->dequeue_list)) {
struct urb *urb = container_of(priv->dequeue_list.next, struct urb, urb_list);
list_for_each_entry_safe(urb, next, &priv->dequeue_list, urb_list) {
list_del_init(&urb->urb_list);
cvmx_usb_cancel(&priv->usb, urb->ep->hcpriv, urb->hcpriv);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment