diff options
author | Matthias Kaehlcke <matthias.kaehlcke@gmail.com> | 2007-12-13 19:03:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:07:20 -0500 |
commit | 01f31ac8289200e1cab4d100ce991cebe5731360 (patch) | |
tree | 7fb3245d3e4797cf1f622836166c266328fa7197 /drivers/net/plip.c | |
parent | 07b270eab52433e3f61c298eb5ff9d9a668c2458 (diff) |
PLIP driver: convert the semaphore killed_timer_sem to completion
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/plip.c')
-rw-r--r-- | drivers/net/plip.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 57c98669984d..fee3d7b1feba 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -106,6 +106,7 @@ static const char version[] = "NET3 PLIP version 2.4-parport gniibe@mri.co.jp\n" | |||
106 | #include <linux/if_plip.h> | 106 | #include <linux/if_plip.h> |
107 | #include <linux/workqueue.h> | 107 | #include <linux/workqueue.h> |
108 | #include <linux/spinlock.h> | 108 | #include <linux/spinlock.h> |
109 | #include <linux/completion.h> | ||
109 | #include <linux/parport.h> | 110 | #include <linux/parport.h> |
110 | #include <linux/bitops.h> | 111 | #include <linux/bitops.h> |
111 | 112 | ||
@@ -114,7 +115,6 @@ static const char version[] = "NET3 PLIP version 2.4-parport gniibe@mri.co.jp\n" | |||
114 | #include <asm/system.h> | 115 | #include <asm/system.h> |
115 | #include <asm/irq.h> | 116 | #include <asm/irq.h> |
116 | #include <asm/byteorder.h> | 117 | #include <asm/byteorder.h> |
117 | #include <asm/semaphore.h> | ||
118 | 118 | ||
119 | /* Maximum number of devices to support. */ | 119 | /* Maximum number of devices to support. */ |
120 | #define PLIP_MAX 8 | 120 | #define PLIP_MAX 8 |
@@ -221,7 +221,7 @@ struct net_local { | |||
221 | int should_relinquish; | 221 | int should_relinquish; |
222 | spinlock_t lock; | 222 | spinlock_t lock; |
223 | atomic_t kill_timer; | 223 | atomic_t kill_timer; |
224 | struct semaphore killed_timer_sem; | 224 | struct completion killed_timer_cmp; |
225 | }; | 225 | }; |
226 | 226 | ||
227 | static inline void enable_parport_interrupts (struct net_device *dev) | 227 | static inline void enable_parport_interrupts (struct net_device *dev) |
@@ -385,7 +385,7 @@ plip_timer_bh(struct work_struct *work) | |||
385 | schedule_delayed_work(&nl->timer, 1); | 385 | schedule_delayed_work(&nl->timer, 1); |
386 | } | 386 | } |
387 | else { | 387 | else { |
388 | up (&nl->killed_timer_sem); | 388 | complete(&nl->killed_timer_cmp); |
389 | } | 389 | } |
390 | } | 390 | } |
391 | 391 | ||
@@ -1112,9 +1112,9 @@ plip_close(struct net_device *dev) | |||
1112 | 1112 | ||
1113 | if (dev->irq == -1) | 1113 | if (dev->irq == -1) |
1114 | { | 1114 | { |
1115 | init_MUTEX_LOCKED (&nl->killed_timer_sem); | 1115 | init_completion(&nl->killed_timer_cmp); |
1116 | atomic_set (&nl->kill_timer, 1); | 1116 | atomic_set (&nl->kill_timer, 1); |
1117 | down (&nl->killed_timer_sem); | 1117 | wait_for_completion(&nl->killed_timer_cmp); |
1118 | } | 1118 | } |
1119 | 1119 | ||
1120 | #ifdef NOTDEF | 1120 | #ifdef NOTDEF |