linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / ax25 / ax25_iface.c
index 07ac020..d68aff1 100644 (file)
@@ -6,12 +6,12 @@
  *
  * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
  */
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/socket.h>
 #include <linux/in.h>
 #include <linux/kernel.h>
-#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/spinlock.h>
 #include <linux/timer.h>
@@ -66,30 +66,28 @@ int ax25_protocol_register(unsigned int pid,
        protocol->pid  = pid;
        protocol->func = func;
 
-       write_lock_bh(&protocol_list_lock);
+       write_lock(&protocol_list_lock);
        protocol->next = protocol_list;
        protocol_list  = protocol;
-       write_unlock_bh(&protocol_list_lock);
+       write_unlock(&protocol_list_lock);
 
        return 1;
 }
 
-EXPORT_SYMBOL(ax25_protocol_register);
-
 void ax25_protocol_release(unsigned int pid)
 {
        struct protocol_struct *s, *protocol;
 
-       write_lock_bh(&protocol_list_lock);
+       write_lock(&protocol_list_lock);
        protocol = protocol_list;
        if (protocol == NULL) {
-               write_unlock_bh(&protocol_list_lock);
+               write_unlock(&protocol_list_lock);
                return;
        }
 
        if (protocol->pid == pid) {
                protocol_list = protocol->next;
-               write_unlock_bh(&protocol_list_lock);
+               write_unlock(&protocol_list_lock);
                kfree(protocol);
                return;
        }
@@ -98,18 +96,16 @@ void ax25_protocol_release(unsigned int pid)
                if (protocol->next->pid == pid) {
                        s = protocol->next;
                        protocol->next = protocol->next->next;
-                       write_unlock_bh(&protocol_list_lock);
+                       write_unlock(&protocol_list_lock);
                        kfree(s);
                        return;
                }
 
                protocol = protocol->next;
        }
-       write_unlock_bh(&protocol_list_lock);
+       write_unlock(&protocol_list_lock);
 }
 
-EXPORT_SYMBOL(ax25_protocol_release);
-
 int ax25_linkfail_register(void (*func)(ax25_cb *, int))
 {
        struct linkfail_struct *linkfail;
@@ -127,8 +123,6 @@ int ax25_linkfail_register(void (*func)(ax25_cb *, int))
        return 1;
 }
 
-EXPORT_SYMBOL(ax25_linkfail_register);
-
 void ax25_linkfail_release(void (*func)(ax25_cb *, int))
 {
        struct linkfail_struct *s, *linkfail;
@@ -161,8 +155,6 @@ void ax25_linkfail_release(void (*func)(ax25_cb *, int))
        spin_unlock_bh(&linkfail_lock);
 }
 
-EXPORT_SYMBOL(ax25_linkfail_release);
-
 int ax25_listen_register(ax25_address *callsign, struct net_device *dev)
 {
        struct listen_struct *listen;
@@ -184,8 +176,6 @@ int ax25_listen_register(ax25_address *callsign, struct net_device *dev)
        return 1;
 }
 
-EXPORT_SYMBOL(ax25_listen_register);
-
 void ax25_listen_release(ax25_address *callsign, struct net_device *dev)
 {
        struct listen_struct *s, *listen;
@@ -218,8 +208,6 @@ void ax25_listen_release(ax25_address *callsign, struct net_device *dev)
        spin_unlock_bh(&listen_lock);
 }
 
-EXPORT_SYMBOL(ax25_listen_release);
-
 int (*ax25_protocol_function(unsigned int pid))(struct sk_buff *, ax25_cb *)
 {
        int (*res)(struct sk_buff *, ax25_cb *) = NULL;
@@ -266,13 +254,13 @@ int ax25_protocol_is_registered(unsigned int pid)
        struct protocol_struct *protocol;
        int res = 0;
 
-       read_lock_bh(&protocol_list_lock);
+       read_lock(&protocol_list_lock);
        for (protocol = protocol_list; protocol != NULL; protocol = protocol->next)
                if (protocol->pid == pid) {
                        res = 1;
                        break;
                }
-       read_unlock_bh(&protocol_list_lock);
+       read_unlock(&protocol_list_lock);
 
        return res;
 }