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

From: Wei Yongjun
Date: Mon Mar 11 2013 - 11:38:43 EST


From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

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

Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
---
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;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/