2013-03-11 15:38:41

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] goldfish: use list_move_tail instead of list_del/list_add_tail

From: Wei Yongjun <[email protected]>

Using list_move_tail() instead of list_del() + list_add_tail().

Signed-off-by: Wei Yongjun <[email protected]>
---
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;
}