From 8f54a344270ee3d809eb808e262f6e8cb067864f Mon Sep 17 00:00:00 2001 From: Matthias Kaehlcke Date: Fri, 14 Dec 2007 11:32:48 -0800 Subject: [PATCH] --- yaml --- r: 78467 b: refs/heads/master c: 5e41fb83216d370d158fe17675af82d12c6c72c9 h: refs/heads/master i: 78465: 0f27c57260c7b41d4be7fec404393eb0634adcbb 78463: 41cb137f1030ec0d67a3172fa3b24193ce1feacd v: v3 --- [refs] | 2 +- trunk/drivers/net/ppp_synctty.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 3b57e528b724..bb813b76561f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9055e051b8d4b266054fe511a65a9888d30fa64f +refs/heads/master: 5e41fb83216d370d158fe17675af82d12c6c72c9 diff --git a/trunk/drivers/net/ppp_synctty.c b/trunk/drivers/net/ppp_synctty.c index f0c6a1926a02..f7472c8505f0 100644 --- a/trunk/drivers/net/ppp_synctty.c +++ b/trunk/drivers/net/ppp_synctty.c @@ -42,9 +42,9 @@ #include #include #include +#include #include #include -#include #define PPP_VERSION "2.4.2" @@ -70,7 +70,7 @@ struct syncppp { struct tasklet_struct tsk; atomic_t refcnt; - struct semaphore dead_sem; + struct completion dead_cmp; struct ppp_channel chan; /* interface to generic ppp layer */ }; @@ -195,7 +195,7 @@ static struct syncppp *sp_get(struct tty_struct *tty) static void sp_put(struct syncppp *ap) { if (atomic_dec_and_test(&ap->refcnt)) - up(&ap->dead_sem); + complete(&ap->dead_cmp); } /* @@ -225,7 +225,7 @@ ppp_sync_open(struct tty_struct *tty) tasklet_init(&ap->tsk, ppp_sync_process, (unsigned long) ap); atomic_set(&ap->refcnt, 1); - init_MUTEX_LOCKED(&ap->dead_sem); + init_completion(&ap->dead_cmp); ap->chan.private = ap; ap->chan.ops = &sync_ops; @@ -273,7 +273,7 @@ ppp_sync_close(struct tty_struct *tty) * by the time it returns. */ if (!atomic_dec_and_test(&ap->refcnt)) - down(&ap->dead_sem); + wait_for_completion(&ap->dead_cmp); tasklet_kill(&ap->tsk); ppp_unregister_channel(&ap->chan);