aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorPavel Emelianov <xemul@openvz.org>2007-05-03 18:13:45 -0400
committerDavid S. Miller <davem@davemloft.net>2007-05-03 18:13:45 -0400
commit7562f876cd93800f2f8c89445f2a563590b24e09 (patch)
tree78a34c011af275efa0d55ba59c3bd49b771dd533 /drivers/net/wireless
parent03fba0479600114f32d29eee74ca3eaa364606bf (diff)
[NET]: Rework dev_base via list_head (v3)
Cleanup of dev_base list use, with the aim to simplify making device list per-namespace. In almost every occasion, use of dev_base variable and dev->next pointer could be easily replaced by for_each_netdev loop. A few most complicated places were converted to using first_netdev()/next_netdev(). Signed-off-by: Pavel Emelianov <xemul@openvz.org> Acked-by: Kirill Korotaev <dev@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/strip.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index 2a299a0676a6..ef32a5c1e818 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -1971,8 +1971,7 @@ static struct net_device *get_strip_dev(struct strip *strip_info)
1971 sizeof(zero_address))) { 1971 sizeof(zero_address))) {
1972 struct net_device *dev; 1972 struct net_device *dev;
1973 read_lock_bh(&dev_base_lock); 1973 read_lock_bh(&dev_base_lock);
1974 dev = dev_base; 1974 for_each_netdev(dev) {
1975 while (dev) {
1976 if (dev->type == strip_info->dev->type && 1975 if (dev->type == strip_info->dev->type &&
1977 !memcmp(dev->dev_addr, 1976 !memcmp(dev->dev_addr,
1978 &strip_info->true_dev_addr, 1977 &strip_info->true_dev_addr,
@@ -1983,7 +1982,6 @@ static struct net_device *get_strip_dev(struct strip *strip_info)
1983 read_unlock_bh(&dev_base_lock); 1982 read_unlock_bh(&dev_base_lock);
1984 return (dev); 1983 return (dev);
1985 } 1984 }
1986 dev = dev->next;
1987 } 1985 }
1988 read_unlock_bh(&dev_base_lock); 1986 read_unlock_bh(&dev_base_lock);
1989 } 1987 }