Skip to content

Commit

Permalink
drivers/dca/dca-core.c: use list_move() instead of list_del()/list_ad…
Browse files Browse the repository at this point in the history
…d() combination

Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Maciej Sosnowski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
kiryl authored and torvalds committed Mar 23, 2011
1 parent f99a993 commit 3bb598f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/dca/dca-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,8 @@ static void unregister_dca_providers(void)
/* at this point only one domain in the list is expected */
domain = list_first_entry(&dca_domains, struct dca_domain, node);

list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) {
list_del(&dca->node);
list_add(&dca->node, &unregistered_providers);
}
list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node)
list_move(&dca->node, &unregistered_providers);

dca_free_domain(domain);

Expand Down

0 comments on commit 3bb598f

Please sign in to comment.