aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25/ax25_iface.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-07-31 20:37:25 -0400
committerPaul Mackerras <paulus@samba.org>2006-07-31 20:37:25 -0400
commit57cad8084e0837e0f2c97da789ec9b3f36809be9 (patch)
treee9c790afb4286f78cb08d9664f58baa7e876fe55 /net/ax25/ax25_iface.c
parentcb18bd40030c879cd93fef02fd579f74dbab473d (diff)
parent49b1e3ea19b1c95c2f012b8331ffb3b169e4c042 (diff)
Merge branch 'merge'
Diffstat (limited to 'net/ax25/ax25_iface.c')
-rw-r--r--net/ax25/ax25_iface.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c
index 77ba07c67682..07ac0207eb69 100644
--- a/net/ax25/ax25_iface.c
+++ b/net/ax25/ax25_iface.c
@@ -66,10 +66,10 @@ int ax25_protocol_register(unsigned int pid,
66 protocol->pid = pid; 66 protocol->pid = pid;
67 protocol->func = func; 67 protocol->func = func;
68 68
69 write_lock(&protocol_list_lock); 69 write_lock_bh(&protocol_list_lock);
70 protocol->next = protocol_list; 70 protocol->next = protocol_list;
71 protocol_list = protocol; 71 protocol_list = protocol;
72 write_unlock(&protocol_list_lock); 72 write_unlock_bh(&protocol_list_lock);
73 73
74 return 1; 74 return 1;
75} 75}
@@ -80,16 +80,16 @@ void ax25_protocol_release(unsigned int pid)
80{ 80{
81 struct protocol_struct *s, *protocol; 81 struct protocol_struct *s, *protocol;
82 82
83 write_lock(&protocol_list_lock); 83 write_lock_bh(&protocol_list_lock);
84 protocol = protocol_list; 84 protocol = protocol_list;
85 if (protocol == NULL) { 85 if (protocol == NULL) {
86 write_unlock(&protocol_list_lock); 86 write_unlock_bh(&protocol_list_lock);
87 return; 87 return;
88 } 88 }
89 89
90 if (protocol->pid == pid) { 90 if (protocol->pid == pid) {
91 protocol_list = protocol->next; 91 protocol_list = protocol->next;
92 write_unlock(&protocol_list_lock); 92 write_unlock_bh(&protocol_list_lock);
93 kfree(protocol); 93 kfree(protocol);
94 return; 94 return;
95 } 95 }
@@ -98,14 +98,14 @@ void ax25_protocol_release(unsigned int pid)
98 if (protocol->next->pid == pid) { 98 if (protocol->next->pid == pid) {
99 s = protocol->next; 99 s = protocol->next;
100 protocol->next = protocol->next->next; 100 protocol->next = protocol->next->next;
101 write_unlock(&protocol_list_lock); 101 write_unlock_bh(&protocol_list_lock);
102 kfree(s); 102 kfree(s);
103 return; 103 return;
104 } 104 }
105 105
106 protocol = protocol->next; 106 protocol = protocol->next;
107 } 107 }
108 write_unlock(&protocol_list_lock); 108 write_unlock_bh(&protocol_list_lock);
109} 109}
110 110
111EXPORT_SYMBOL(ax25_protocol_release); 111EXPORT_SYMBOL(ax25_protocol_release);
@@ -266,13 +266,13 @@ int ax25_protocol_is_registered(unsigned int pid)
266 struct protocol_struct *protocol; 266 struct protocol_struct *protocol;
267 int res = 0; 267 int res = 0;
268 268
269 read_lock(&protocol_list_lock); 269 read_lock_bh(&protocol_list_lock);
270 for (protocol = protocol_list; protocol != NULL; protocol = protocol->next) 270 for (protocol = protocol_list; protocol != NULL; protocol = protocol->next)
271 if (protocol->pid == pid) { 271 if (protocol->pid == pid) {
272 res = 1; 272 res = 1;
273 break; 273 break;
274 } 274 }
275 read_unlock(&protocol_list_lock); 275 read_unlock_bh(&protocol_list_lock);
276 276
277 return res; 277 return res;
278} 278}