HID: intel-ish-hid: 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 <weiyongjun1@huawei.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Wei Yongjun 2016-08-21 15:27:29 +00:00 committed by Jiri Kosina
parent 8fb861fa07
commit 67c0fe420e

View File

@ -448,8 +448,7 @@ static int ish_fw_reset_handler(struct ishtp_device *dev)
spin_lock_irqsave(&dev->wr_processing_spinlock, flags);
list_for_each_entry_safe(processing, next,
&dev->wr_processing_list_head.link, link) {
list_del(&processing->link);
list_add_tail(&processing->link, &dev->wr_free_list_head.link);
list_move_tail(&processing->link, &dev->wr_free_list_head.link);
}
spin_unlock_irqrestore(&dev->wr_processing_spinlock, flags);