Commit 8eb41299 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

USB: WUSBCORE: use list_move_tail instead of list_del/list_add_tail

Using list_move_tail() instead of list_del() + list_add_tail().
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7868943d
...@@ -1552,10 +1552,8 @@ static void wa_xfer_result_chew(struct wahc *wa, struct wa_xfer *xfer) ...@@ -1552,10 +1552,8 @@ static void wa_xfer_result_chew(struct wahc *wa, struct wa_xfer *xfer)
dev_info(dev, "Control EP stall. Queue delayed work.\n"); dev_info(dev, "Control EP stall. Queue delayed work.\n");
spin_lock_irq(&wa->xfer_list_lock); spin_lock_irq(&wa->xfer_list_lock);
/* remove xfer from xfer_list. */ /* move xfer from xfer_list to xfer_errored_list. */
list_del(&xfer->list_node); list_move_tail(&xfer->list_node, &wa->xfer_errored_list);
/* add xfer to xfer_errored_list. */
list_add_tail(&xfer->list_node, &wa->xfer_errored_list);
spin_unlock_irq(&wa->xfer_list_lock); spin_unlock_irq(&wa->xfer_list_lock);
spin_unlock_irqrestore(&xfer->lock, flags); spin_unlock_irqrestore(&xfer->lock, flags);
queue_work(wusbd, &wa->xfer_error_work); queue_work(wusbd, &wa->xfer_error_work);
......
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