summaryrefslogtreecommitdiffstats
path: root/drivers/misc/parport_share.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/parport_share.c')
-rw-r--r--drivers/misc/parport_share.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/misc/parport_share.c b/drivers/misc/parport_share.c
index 7da49fae4..be53e2ba6 100644
--- a/drivers/misc/parport_share.c
+++ b/drivers/misc/parport_share.c
@@ -1,4 +1,5 @@
-/* $Id: parport_share.c,v 1.14 1998/05/04 19:05:05 ralf Exp $
+/* $Id: parport_share.c,v 1.9 1998/05/07 02:59:59 ralf Exp $
+ *
* Parallel-port resource manager code.
*
* Authors: David Campbell <campbell@tirian.che.curtin.edu.au>
@@ -308,7 +309,9 @@ try_again:
}
/* Now we do the change of devices */
+ spin_lock_irqsave(&port->lock, flags);
port->cad = dev;
+ spin_unlock_irqrestore(&port->lock, flags);
/* Swap the IRQ handlers. */
if (port->irq != PARPORT_IRQ_NONE) {
@@ -346,9 +349,8 @@ blocked:
dev->waitprev = port->waittail;
if (port->waittail)
port->waittail->waitnext = dev;
- else {
- port->waithead = dev->port->waittail = dev;
- }
+ else
+ port->waithead = port->waittail = dev;
}
spin_unlock_irqrestore (&port->lock, flags);
}