mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-15 06:00:41 +00:00
staging: octeon-usb: use list_for_each_entry_safe()
Use list_for_each_entry_safe() when deleting all list items. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
244544a185
commit
f011fefa8a
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user