diff options
author | Robert P. J. Day <rpjday@crashcourse.ca> | 2008-03-23 22:47:53 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-23 22:47:53 -0700 |
commit | 9bd512f619cc116b7830134d7c9f6e404a38c7bf (patch) | |
tree | 1d7cbda4dbfedaf079a88d2a2748c059806b7972 /drivers | |
parent | 80445cfb28a6b093540582b68d9ae928bf34cfe7 (diff) | |
download | op-kernel-dev-9bd512f619cc116b7830134d7c9f6e404a38c7bf.zip op-kernel-dev-9bd512f619cc116b7830134d7c9f6e404a38c7bf.tar.gz |
[CASSINI]: Use shorter list_splice_init() macro for brevity.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/cassini.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 14299f8..93e1363 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c @@ -532,8 +532,7 @@ static void cas_spare_free(struct cas *cp) /* free spare buffers */ INIT_LIST_HEAD(&list); spin_lock(&cp->rx_spare_lock); - list_splice(&cp->rx_spare_list, &list); - INIT_LIST_HEAD(&cp->rx_spare_list); + list_splice_init(&cp->rx_spare_list, &list); spin_unlock(&cp->rx_spare_lock); list_for_each_safe(elem, tmp, &list) { cas_page_free(cp, list_entry(elem, cas_page_t, list)); @@ -546,13 +545,11 @@ static void cas_spare_free(struct cas *cp) * lock than used everywhere else to manipulate this list. */ spin_lock(&cp->rx_inuse_lock); - list_splice(&cp->rx_inuse_list, &list); - INIT_LIST_HEAD(&cp->rx_inuse_list); + list_splice_init(&cp->rx_inuse_list, &list); spin_unlock(&cp->rx_inuse_lock); #else spin_lock(&cp->rx_spare_lock); - list_splice(&cp->rx_inuse_list, &list); - INIT_LIST_HEAD(&cp->rx_inuse_list); + list_splice_init(&cp->rx_inuse_list, &list); spin_unlock(&cp->rx_spare_lock); #endif list_for_each_safe(elem, tmp, &list) { @@ -573,8 +570,7 @@ static void cas_spare_recover(struct cas *cp, const gfp_t flags) /* make a local copy of the list */ INIT_LIST_HEAD(&list); spin_lock(&cp->rx_inuse_lock); - list_splice(&cp->rx_inuse_list, &list); - INIT_LIST_HEAD(&cp->rx_inuse_list); + list_splice_init(&cp->rx_inuse_list, &list); spin_unlock(&cp->rx_inuse_lock); list_for_each_safe(elem, tmp, &list) { |