summaryrefslogtreecommitdiff
path: root/drivers/net/team
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-06-09 17:45:12 +0300
committerDavid S. Miller <davem@davemloft.net>2016-06-09 23:28:37 +0300
commitd3fff6c443fe8f8a5ef2bdcea45e2ff39db948c7 (patch)
treeec632344dab9ba6c7a3767aa4054e682ddf5871c /drivers/net/team
parent52fbb2907988aa0583c6d9d53a56aee090b2df7e (diff)
downloadlinux-d3fff6c443fe8f8a5ef2bdcea45e2ff39db948c7.tar.xz
net: add netdev_lockdep_set_classes() helper
It is time to add netdev_lockdep_set_classes() helper so that lockdep annotations per device type are easier to manage. This removes a lot of copies and missing annotations. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team')
-rw-r--r--drivers/net/team/team.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 00eb38956a2c..0a1bb8387d96 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1574,25 +1574,6 @@ static const struct team_option team_options[] = {
},
};
-static struct lock_class_key team_netdev_xmit_lock_key;
-static struct lock_class_key team_netdev_addr_lock_key;
-static struct lock_class_key team_tx_busylock_key;
-static struct lock_class_key team_qdisc_running_key;
-
-static void team_set_lockdep_class_one(struct net_device *dev,
- struct netdev_queue *txq,
- void *unused)
-{
- lockdep_set_class(&txq->_xmit_lock, &team_netdev_xmit_lock_key);
-}
-
-static void team_set_lockdep_class(struct net_device *dev)
-{
- lockdep_set_class(&dev->addr_list_lock, &team_netdev_addr_lock_key);
- netdev_for_each_tx_queue(dev, team_set_lockdep_class_one, NULL);
- dev->qdisc_tx_busylock = &team_tx_busylock_key;
- dev->qdisc_running_key = &team_qdisc_running_key;
-}
static int team_init(struct net_device *dev)
{
@@ -1628,7 +1609,7 @@ static int team_init(struct net_device *dev)
goto err_options_register;
netif_carrier_off(dev);
- team_set_lockdep_class(dev);
+ netdev_lockdep_set_classes(dev);
return 0;