aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/bpqether.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/hamradio/bpqether.c')
-rw-r--r--drivers/net/hamradio/bpqether.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 5f4b4c6c9f76..fb186b8c3d4d 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -124,6 +124,16 @@ static LIST_HEAD(bpq_devices);
124 */ 124 */
125static struct lock_class_key bpq_netdev_xmit_lock_key; 125static struct lock_class_key bpq_netdev_xmit_lock_key;
126 126
127static void bpq_set_lockdep_class_one(struct netdev_queue *txq)
128{
129 lockdep_set_class(&txq->_xmit_lock, &bpq_netdev_xmit_lock_key);
130}
131
132static void bpq_set_lockdep_class(struct net_device *dev)
133{
134 bpq_set_lockdep_class_one(&dev->tx_queue);
135}
136
127/* ------------------------------------------------------------------------ */ 137/* ------------------------------------------------------------------------ */
128 138
129 139
@@ -523,7 +533,7 @@ static int bpq_new_device(struct net_device *edev)
523 err = register_netdevice(ndev); 533 err = register_netdevice(ndev);
524 if (err) 534 if (err)
525 goto error; 535 goto error;
526 lockdep_set_class(&ndev->_xmit_lock, &bpq_netdev_xmit_lock_key); 536 bpq_set_lockdep_class(ndev);
527 537
528 /* List protected by RTNL */ 538 /* List protected by RTNL */
529 list_add_rcu(&bpq->bpq_list, &bpq_devices); 539 list_add_rcu(&bpq->bpq_list, &bpq_devices);