diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-03-21 01:33:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:33:17 -0500 |
commit | 4a3e2f711a00a1feb72ae12fdc749da10179d185 (patch) | |
tree | 76ced9d3270dea4b864da71fa1d4415d2e3c8b11 /net/atm | |
parent | d4ccd08cdfa8d34f4d25b62041343c52fc79385f (diff) |
[NET] sem2mutex: net/
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm')
-rw-r--r-- | net/atm/ioctl.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c index eb109af7eb4a..851cfa6312af 100644 --- a/net/atm/ioctl.c +++ b/net/atm/ioctl.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/atmmpc.h> | 18 | #include <linux/atmmpc.h> |
19 | #include <net/atmclip.h> | 19 | #include <net/atmclip.h> |
20 | #include <linux/atmlec.h> | 20 | #include <linux/atmlec.h> |
21 | #include <linux/mutex.h> | ||
21 | #include <asm/ioctls.h> | 22 | #include <asm/ioctls.h> |
22 | 23 | ||
23 | #include "resources.h" | 24 | #include "resources.h" |
@@ -25,22 +26,22 @@ | |||
25 | #include "common.h" | 26 | #include "common.h" |
26 | 27 | ||
27 | 28 | ||
28 | static DECLARE_MUTEX(ioctl_mutex); | 29 | static DEFINE_MUTEX(ioctl_mutex); |
29 | static LIST_HEAD(ioctl_list); | 30 | static LIST_HEAD(ioctl_list); |
30 | 31 | ||
31 | 32 | ||
32 | void register_atm_ioctl(struct atm_ioctl *ioctl) | 33 | void register_atm_ioctl(struct atm_ioctl *ioctl) |
33 | { | 34 | { |
34 | down(&ioctl_mutex); | 35 | mutex_lock(&ioctl_mutex); |
35 | list_add_tail(&ioctl->list, &ioctl_list); | 36 | list_add_tail(&ioctl->list, &ioctl_list); |
36 | up(&ioctl_mutex); | 37 | mutex_unlock(&ioctl_mutex); |
37 | } | 38 | } |
38 | 39 | ||
39 | void deregister_atm_ioctl(struct atm_ioctl *ioctl) | 40 | void deregister_atm_ioctl(struct atm_ioctl *ioctl) |
40 | { | 41 | { |
41 | down(&ioctl_mutex); | 42 | mutex_lock(&ioctl_mutex); |
42 | list_del(&ioctl->list); | 43 | list_del(&ioctl->list); |
43 | up(&ioctl_mutex); | 44 | mutex_unlock(&ioctl_mutex); |
44 | } | 45 | } |
45 | 46 | ||
46 | EXPORT_SYMBOL(register_atm_ioctl); | 47 | EXPORT_SYMBOL(register_atm_ioctl); |
@@ -137,7 +138,7 @@ int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
137 | 138 | ||
138 | error = -ENOIOCTLCMD; | 139 | error = -ENOIOCTLCMD; |
139 | 140 | ||
140 | down(&ioctl_mutex); | 141 | mutex_lock(&ioctl_mutex); |
141 | list_for_each(pos, &ioctl_list) { | 142 | list_for_each(pos, &ioctl_list) { |
142 | struct atm_ioctl * ic = list_entry(pos, struct atm_ioctl, list); | 143 | struct atm_ioctl * ic = list_entry(pos, struct atm_ioctl, list); |
143 | if (try_module_get(ic->owner)) { | 144 | if (try_module_get(ic->owner)) { |
@@ -147,7 +148,7 @@ int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
147 | break; | 148 | break; |
148 | } | 149 | } |
149 | } | 150 | } |
150 | up(&ioctl_mutex); | 151 | mutex_unlock(&ioctl_mutex); |
151 | 152 | ||
152 | if (error != -ENOIOCTLCMD) | 153 | if (error != -ENOIOCTLCMD) |
153 | goto done; | 154 | goto done; |