vserver 1.9.5.x5
[linux-2.6.git] / net / ipv4 / protocol.c
index a98eb52..90a587c 100644 (file)
 #include <net/ipip.h>
 #include <linux/igmp.h>
 
-struct inet_protocol *inet_protos[MAX_INET_PROTOS];
-static spinlock_t inet_proto_lock = SPIN_LOCK_UNLOCKED;
+struct net_protocol *inet_protos[MAX_INET_PROTOS];
+static DEFINE_SPINLOCK(inet_proto_lock);
 
 /*
  *     Add a protocol handler to the hash tables
  */
 
-int inet_add_protocol(struct inet_protocol *prot, unsigned char protocol)
+int inet_add_protocol(struct net_protocol *prot, unsigned char protocol)
 {
        int hash, ret;
 
@@ -77,7 +77,7 @@ int inet_add_protocol(struct inet_protocol *prot, unsigned char protocol)
  *     Remove a protocol from the hash tables.
  */
  
-int inet_del_protocol(struct inet_protocol *prot, unsigned char protocol)
+int inet_del_protocol(struct net_protocol *prot, unsigned char protocol)
 {
        int hash, ret;