aboutsummaryrefslogtreecommitdiffstats
path: root/net/netrom
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-09 02:13:53 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-09 02:13:53 -0400
commitc773e847ea8f6812804e40f52399c6921a00eab1 (patch)
tree952e0e262cc0b0f2136bc2a62938ae1d186f896a /net/netrom
parenteb6aafe3f843cb0e939546c03540a3b4911b6964 (diff)
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;
74 */ 74 */
75static struct lock_class_key nr_netdev_xmit_lock_key; 75static struct lock_class_key nr_netdev_xmit_lock_key;
76 76
77static void nr_set_lockdep_one(struct netdev_queue *txq)
78{
79 lockdep_set_class(&txq->_xmit_lock, &nr_netdev_xmit_lock_key);
80}
81
82static void nr_set_lockdep_key(struct net_device *dev)
83{
84 nr_set_lockdep_one(&dev->tx_queue);
85}
86
77/* 87/*
78 * Socket removal during an interrupt is now safe. 88 * Socket removal during an interrupt is now safe.
79 */ 89 */
@@ -1430,7 +1440,7 @@ static int __init nr_proto_init(void)
1430 free_netdev(dev); 1440 free_netdev(dev);
1431 goto fail; 1441 goto fail;
1432 } 1442 }
1433 lockdep_set_class(&dev->_xmit_lock, &nr_netdev_xmit_lock_key); 1443 nr_set_lockdep_key(dev);
1434 dev_nr[i] = dev; 1444 dev_nr[i] = dev;
1435 } 1445 }
1436 1446