vserver 1.9.5.x5
[linux-2.6.git] / net / netrom / af_netrom.c
index fbb97bf..39223bb 100644 (file)
@@ -10,6 +10,7 @@
  */
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/socket.h>
@@ -42,7 +43,7 @@
 #include <net/arp.h>
 #include <linux/init.h>
 
-int nr_ndevs = 4;
+static int nr_ndevs = 4;
 
 int sysctl_netrom_default_path_quality            = NR_DEFAULT_QUAL;
 int sysctl_netrom_obsolescence_count_initialiser  = NR_DEFAULT_OBS;
@@ -59,7 +60,7 @@ int sysctl_netrom_link_fails_count                = NR_DEFAULT_FAILS;
 static unsigned short circuit = 0x101;
 
 static HLIST_HEAD(nr_list);
-static spinlock_t nr_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nr_list_lock);
 
 static struct proto_ops nr_proto_ops;
 void nr_init_timers(struct sock *sk);
@@ -800,7 +801,6 @@ static int nr_accept(struct socket *sock, struct socket *newsock, int flags)
        remove_wait_queue(sk->sk_sleep, &wait);
 
        newsk = skb->sk;
-       newsk->sk_pair = NULL;
        newsk->sk_socket = newsock;
        newsk->sk_sleep = &newsock->wait;
 
@@ -993,7 +993,6 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)
        nr_make->vl        = 0;
        nr_make->state     = NR_STATE_3;
        sk->sk_ack_backlog++;
-       make->sk_pair = sk;
 
        nr_insert_socket(make);
 
@@ -1451,8 +1450,7 @@ static int __init nr_proto_init(void)
 
 module_init(nr_proto_init);
 
-
-MODULE_PARM(nr_ndevs, "i");
+module_param(nr_ndevs, int, 0);
 MODULE_PARM_DESC(nr_ndevs, "number of NET/ROM devices");
 
 MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>");