#include <linux/if_plip.h>
#include <linux/workqueue.h>
#include <linux/spinlock.h>
+#include <linux/completion.h>
#include <linux/parport.h>
#include <linux/bitops.h>
#include <asm/system.h>
#include <asm/irq.h>
#include <asm/byteorder.h>
-#include <asm/semaphore.h>
/* Maximum number of devices to support. */
#define PLIP_MAX 8
int should_relinquish;
spinlock_t lock;
atomic_t kill_timer;
- struct semaphore killed_timer_sem;
+ struct completion killed_timer_cmp;
};
static inline void enable_parport_interrupts (struct net_device *dev)
schedule_delayed_work(&nl->timer, 1);
}
else {
- up (&nl->killed_timer_sem);
+ complete(&nl->killed_timer_cmp);
}
}
if (dev->irq == -1)
{
- init_MUTEX_LOCKED (&nl->killed_timer_sem);
+ init_completion(&nl->killed_timer_cmp);
atomic_set (&nl->kill_timer, 1);
- down (&nl->killed_timer_sem);
+ wait_for_completion(&nl->killed_timer_cmp);
}
#ifdef NOTDEF