[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:

committed by
Linus Torvalds

parent
a7addcea6a
commit
1bfba4e8ea
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user