summaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/bpqether.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-09 08:13:53 +0200
committerDavid S. Miller <davem@davemloft.net>2008-07-09 08:13:53 +0200
commitc773e847ea8f6812804e40f52399c6921a00eab1 (patch)
tree952e0e262cc0b0f2136bc2a62938ae1d186f896a /drivers/net/hamradio/bpqether.c
parentpkt_sched: Make qdisc_run take a netdev_queue. (diff)
downloadlinux-c773e847ea8f6812804e40f52399c6921a00eab1.tar.xz
linux-c773e847ea8f6812804e40f52399c6921a00eab1.zip
netdev: Move _xmit_lock and xmit_lock_owner into netdev_queue.
Accesses are mostly structured such that when there are multiple TX queues the code transformations will be a little bit simpler. Signed-off-by: David S. Miller <davem@davemloft.net>
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);
*/
static struct lock_class_key bpq_netdev_xmit_lock_key;
+static void bpq_set_lockdep_class_one(struct netdev_queue *txq)
+{
+ lockdep_set_class(&txq->_xmit_lock, &bpq_netdev_xmit_lock_key);
+}
+
+static void bpq_set_lockdep_class(struct net_device *dev)
+{
+ bpq_set_lockdep_class_one(&dev->tx_queue);
+}
+
/* ------------------------------------------------------------------------ */
@@ -523,7 +533,7 @@ static int bpq_new_device(struct net_device *edev)
err = register_netdevice(ndev);
if (err)
goto error;
- lockdep_set_class(&ndev->_xmit_lock, &bpq_netdev_xmit_lock_key);
+ bpq_set_lockdep_class(ndev);
/* List protected by RTNL */
list_add_rcu(&bpq->bpq_list, &bpq_devices);