Messages in this thread Patch in this message | | | Date | Mon, 11 Mar 2013 23:38:38 +0800 | Subject | [PATCH -next] goldfish: use list_move_tail instead of list_del/list_add_tail | From | Wei Yongjun <> |
| |
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Using list_move_tail() instead of list_del() + list_add_tail().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> --- drivers/platform/goldfish/pdev_bus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/goldfish/pdev_bus.c b/drivers/platform/goldfish/pdev_bus.c index 92cc4cf..816faf0 100644 --- a/drivers/platform/goldfish/pdev_bus.c +++ b/drivers/platform/goldfish/pdev_bus.c @@ -91,8 +91,7 @@ static void goldfish_pdev_remove(void) } list_for_each_entry_safe(pos, n, &pdev_bus_registered_devices, list) { if (pos->resources[0].start == base) { - list_del(&pos->list); - list_add_tail(&pos->list, &pdev_bus_removed_devices); + list_move_tail(&pos->list, &pdev_bus_removed_devices); schedule_work(&pdev_bus_worker); return; }
| |