diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-28 04:07:18 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-07-28 04:07:18 -0400 |
commit | b6e47e970eff62e1559c6173af3cc8a7c68c19ea (patch) | |
tree | 0d468a2b324455bec96ba4f72b9dde0c28daef28 /drivers/net/ppp_async.c | |
parent | d41f9a858587b2b8c079be44a12aa70e1e1b9120 (diff) |
net: ppp_async: Convert to anon_semaphore
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/net/ppp_async.c')
-rw-r--r-- | drivers/net/ppp_async.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index c8b9f06d306d..1a29a1c3cfd8 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c | |||
@@ -67,7 +67,7 @@ struct asyncppp { | |||
67 | struct tasklet_struct tsk; | 67 | struct tasklet_struct tsk; |
68 | 68 | ||
69 | atomic_t refcnt; | 69 | atomic_t refcnt; |
70 | struct semaphore dead_sem; | 70 | struct anon_semaphore dead_sem; |
71 | struct ppp_channel chan; /* interface to generic ppp layer */ | 71 | struct ppp_channel chan; /* interface to generic ppp layer */ |
72 | unsigned char obuf[OBUFSIZE]; | 72 | unsigned char obuf[OBUFSIZE]; |
73 | }; | 73 | }; |
@@ -145,7 +145,7 @@ static struct asyncppp *ap_get(struct tty_struct *tty) | |||
145 | static void ap_put(struct asyncppp *ap) | 145 | static void ap_put(struct asyncppp *ap) |
146 | { | 146 | { |
147 | if (atomic_dec_and_test(&ap->refcnt)) | 147 | if (atomic_dec_and_test(&ap->refcnt)) |
148 | up(&ap->dead_sem); | 148 | anon_up(&ap->dead_sem); |
149 | } | 149 | } |
150 | 150 | ||
151 | /* | 151 | /* |
@@ -183,7 +183,7 @@ ppp_asynctty_open(struct tty_struct *tty) | |||
183 | tasklet_init(&ap->tsk, ppp_async_process, (unsigned long) ap); | 183 | tasklet_init(&ap->tsk, ppp_async_process, (unsigned long) ap); |
184 | 184 | ||
185 | atomic_set(&ap->refcnt, 1); | 185 | atomic_set(&ap->refcnt, 1); |
186 | semaphore_init_locked(&ap->dead_sem); | 186 | anon_semaphore_init_locked(&ap->dead_sem); |
187 | 187 | ||
188 | ap->chan.private = ap; | 188 | ap->chan.private = ap; |
189 | ap->chan.ops = &async_ops; | 189 | ap->chan.ops = &async_ops; |
@@ -232,7 +232,7 @@ ppp_asynctty_close(struct tty_struct *tty) | |||
232 | * by the time it returns. | 232 | * by the time it returns. |
233 | */ | 233 | */ |
234 | if (!atomic_dec_and_test(&ap->refcnt)) | 234 | if (!atomic_dec_and_test(&ap->refcnt)) |
235 | down(&ap->dead_sem); | 235 | anon_down(&ap->dead_sem); |
236 | tasklet_kill(&ap->tsk); | 236 | tasklet_kill(&ap->tsk); |
237 | 237 | ||
238 | ppp_unregister_channel(&ap->chan); | 238 | ppp_unregister_channel(&ap->chan); |