patch-2.1.68 linux/drivers/misc/parport_share.c

Next file: linux/drivers/net/3c59x.c
Previous file: linux/drivers/misc/parport_procfs.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.67/linux/drivers/misc/parport_share.c linux/drivers/misc/parport_share.c
@@ -1,4 +1,5 @@
-/* Parallel-port resource manager code.
+/* $Id: parport_share.c,v 1.8 1997/11/08 18:55:29 philip Exp $
+ * Parallel-port resource manager code.
  * 
  * Authors: David Campbell <campbell@tirian.che.curtin.edu.au>
  *          Tim Waugh <tim@cyberelk.demon.co.uk>
@@ -29,6 +30,8 @@
 static struct parport *portlist = NULL, *portlist_tail = NULL;
 static int portcount = 0;
 
+void (*parport_probe_hook)(struct parport *port) = NULL;
+
 /* Return a list of all the ports we know about. */
 struct parport *parport_enumerate(void)
 {
@@ -275,11 +278,11 @@
 	dev->port->cad = dev;
 
 	/* Swap the IRQ handlers. */
-	if (dev->port->irq >= 0) {
+	if (dev->port->irq != PARPORT_IRQ_NONE) {
 		free_irq(dev->port->irq, dev->port);
 		request_irq(dev->port->irq, dev->irq_func ? dev->irq_func :
 			    parport_null_intr_func, SA_INTERRUPT, dev->name,
-			    dev->port);
+			    dev->private);
 	}
 
 	/* Restore control registers */
@@ -303,10 +306,10 @@
 	dev->port->ops->save_state(dev->port, dev->state);
 
 	/* Point IRQs somewhere harmless. */
-	if (dev->port->irq >= 0) {
+	if (dev->port->irq != PARPORT_IRQ_NONE) {
 		free_irq(dev->port->irq, dev->port);
 		request_irq(dev->port->irq, parport_null_intr_func,
-			    SA_INTERRUPT, dev->port->name, dev->port);
+			    SA_INTERRUPT, dev->port->name, NULL);
  	}
 
 	/* Walk the list, offering a wakeup callback to everybody other

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov