summaryrefslogtreecommitdiffstats
path: root/drivers/usb/wusbcore/wa-xfer.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-09-23 14:16:22 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-25 17:27:01 -0700
commit8eb4129929e9eb563fbab807a2b274d32042d034 (patch)
tree9f0271efd807851e03c9dffb13e9c8288e473434 /drivers/usb/wusbcore/wa-xfer.c
parent7868943db1668fba898cf71bed1506c19d6958aa (diff)
downloadtalos-op-linux-8eb4129929e9eb563fbab807a2b274d32042d034.tar.gz
talos-op-linux-8eb4129929e9eb563fbab807a2b274d32042d034.zip
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/wusbcore/wa-xfer.c')
-rw-r--r--drivers/usb/wusbcore/wa-xfer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
index 6ad02f57c366..cf1097963f8b 100644
--- a/drivers/usb/wusbcore/wa-xfer.c
+++ b/drivers/usb/wusbcore/wa-xfer.c
@@ -1552,10 +1552,8 @@ error_complete:
dev_info(dev, "Control EP stall. Queue delayed work.\n");
spin_lock_irq(&wa->xfer_list_lock);
- /* remove xfer from xfer_list. */
- list_del(&xfer->list_node);
- /* add xfer to xfer_errored_list. */
- list_add_tail(&xfer->list_node, &wa->xfer_errored_list);
+ /* move xfer from xfer_list to xfer_errored_list. */
+ list_move_tail(&xfer->list_node, &wa->xfer_errored_list);
spin_unlock_irq(&wa->xfer_list_lock);
spin_unlock_irqrestore(&xfer->lock, flags);
queue_work(wusbd, &wa->xfer_error_work);
OpenPOWER on IntegriCloud