diff options
Diffstat (limited to 'drivers/net/hamradio/bpqether.c')
-rw-r--r-- | drivers/net/hamradio/bpqether.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index 5f4b4c6c9f76..b6500b2aacf2 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c | |||
@@ -124,6 +124,18 @@ static LIST_HEAD(bpq_devices); | |||
124 | */ | 124 | */ |
125 | static struct lock_class_key bpq_netdev_xmit_lock_key; | 125 | static struct lock_class_key bpq_netdev_xmit_lock_key; |
126 | 126 | ||
127 | static void bpq_set_lockdep_class_one(struct net_device *dev, | ||
128 | struct netdev_queue *txq, | ||
129 | void *_unused) | ||
130 | { | ||
131 | lockdep_set_class(&txq->_xmit_lock, &bpq_netdev_xmit_lock_key); | ||
132 | } | ||
133 | |||
134 | static void bpq_set_lockdep_class(struct net_device *dev) | ||
135 | { | ||
136 | netdev_for_each_tx_queue(dev, bpq_set_lockdep_class_one, NULL); | ||
137 | } | ||
138 | |||
127 | /* ------------------------------------------------------------------------ */ | 139 | /* ------------------------------------------------------------------------ */ |
128 | 140 | ||
129 | 141 | ||
@@ -523,7 +535,7 @@ static int bpq_new_device(struct net_device *edev) | |||
523 | err = register_netdevice(ndev); | 535 | err = register_netdevice(ndev); |
524 | if (err) | 536 | if (err) |
525 | goto error; | 537 | goto error; |
526 | lockdep_set_class(&ndev->_xmit_lock, &bpq_netdev_xmit_lock_key); | 538 | bpq_set_lockdep_class(ndev); |
527 | 539 | ||
528 | /* List protected by RTNL */ | 540 | /* List protected by RTNL */ |
529 | list_add_rcu(&bpq->bpq_list, &bpq_devices); | 541 | list_add_rcu(&bpq->bpq_list, &bpq_devices); |