diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2013-10-10 23:25:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-11 15:45:59 -0700 |
commit | 244544a1850a47b89f5dca4bb4d20f6800767f4e (patch) | |
tree | 9d40237edda85ed4aa3801dff990a118252548b1 /drivers/staging/octeon-usb | |
parent | d2695a8a3de7247a4a034a6bb1ad332261db47d7 (diff) | |
download | linux-244544a1850a47b89f5dca4bb4d20f6800767f4e.tar.bz2 |
staging: octeon-usb: use list_del_init()
Replace list_del() + INIT_LIST_HEAD() with list_del_init().
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon-usb')
-rw-r--r-- | drivers/staging/octeon-usb/octeon-hcd.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index 6e72bf0e22e5..632190aa2ee4 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -2036,17 +2036,14 @@ static void octeon_usb_urb_complete_callback(struct cvmx_usb_state *usb, urb->actual_length = bytes_transferred; urb->hcpriv = NULL; - if (!list_empty(&urb->urb_list)) { + if (!list_empty(&urb->urb_list)) /* * It is on the dequeue_list, but we are going to call * usb_hcd_giveback_urb(), so we must clear it from * the list. We got to it before the * octeon_usb_urb_dequeue_work() tasklet did. */ - list_del(&urb->urb_list); - /* No longer on the dequeue_list. */ - INIT_LIST_HEAD(&urb->urb_list); - } + list_del_init(&urb->urb_list); /* For Isochronous transactions we need to update the URB packet status list from data in our private copy */ @@ -3233,9 +3230,7 @@ static void octeon_usb_urb_dequeue_work(unsigned long arg) while (!list_empty(&priv->dequeue_list)) { struct urb *urb = container_of(priv->dequeue_list.next, struct urb, urb_list); - list_del(&urb->urb_list); - /* not enqueued on dequeue_list */ - INIT_LIST_HEAD(&urb->urb_list); + list_del_init(&urb->urb_list); cvmx_usb_cancel(&priv->usb, urb->ep->hcpriv, urb->hcpriv); } |