summaryrefslogtreecommitdiffstats
path: root/net/netrom
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 /net/netrom
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 'net/netrom')
-rw-r--r--net/netrom/af_netrom.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 74884f4a6255..819afc449e1e 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -74,6 +74,16 @@ static const struct proto_ops nr_proto_ops;
*/
static struct lock_class_key nr_netdev_xmit_lock_key;
+static void nr_set_lockdep_one(struct netdev_queue *txq)
+{
+ lockdep_set_class(&txq->_xmit_lock, &nr_netdev_xmit_lock_key);
+}
+
+static void nr_set_lockdep_key(struct net_device *dev)
+{
+ nr_set_lockdep_one(&dev->tx_queue);
+}
+
/*
* Socket removal during an interrupt is now safe.
*/
@@ -1430,7 +1440,7 @@ static int __init nr_proto_init(void)
free_netdev(dev);
goto fail;
}
- lockdep_set_class(&dev->_xmit_lock, &nr_netdev_xmit_lock_key);
+ nr_set_lockdep_key(dev);
dev_nr[i] = dev;
}