[PATCH] core: use list_move()

This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B).

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Akinobu Mita
2006-06-26 00:24:40 -07:00
committed by Linus Torvalds
parent a7addcea6a
commit 1bfba4e8ea
8 changed files with 22 additions and 38 deletions

View File

@@ -53,8 +53,7 @@ void dpm_resume(void)
struct device * dev = to_device(entry);
get_device(dev);
list_del_init(entry);
list_add_tail(entry, &dpm_active);
list_move_tail(entry, &dpm_active);
up(&dpm_list_sem);
if (!dev->power.prev_state.event)
@@ -101,8 +100,7 @@ void dpm_power_up(void)
struct device * dev = to_device(entry);
get_device(dev);
list_del_init(entry);
list_add_tail(entry, &dpm_active);
list_move_tail(entry, &dpm_active);
resume_device(dev);
put_device(dev);
}