patch-2.1.126 linux/drivers/misc/parport_ax.c

Next file: linux/drivers/misc/parport_pc.c
Previous file: linux/drivers/misc/parport_arc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.125/linux/drivers/misc/parport_ax.c linux/drivers/misc/parport_ax.c
@@ -50,10 +50,9 @@
 #define CONFIGB		0x401
 #define ECONTROL	0x402
 
-static void
-parport_ax_null_intr_func(int irq, void *dev_id, struct pt_regs *regs)
+static void parport_ax_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	/* NULL function - Does nothing */
+	parport_generic_irq(irq, (struct parport *) dev_id, regs);
 }
 
 void
@@ -206,7 +205,7 @@
 {
 	if (p->irq != PARPORT_IRQ_NONE) {
 		parport_ax_disable_irq(p);
-		free_irq(p->irq, NULL);
+		free_irq(p->irq, p);
 	}
 	release_region(p->base, p->size);
 	if (p->modes & PARPORT_MODE_PCECR)
@@ -219,11 +218,15 @@
 parport_ax_claim_resources(struct parport *p)
 {
 	/* FIXME check that resources are free */
-	if (p->irq != PARPORT_IRQ_NONE) {
-		request_irq(p->irq, parport_ax_null_intr_func,
-			    0, p->name, NULL);
-		parport_ax_enable_irq(p);
-	}
+	int err;
+
+	if (p->irq != PARPORT_IRQ_NONE)
+		if ((err = request_irq(p->irq, parport_ax_interrupt,
+				       0, p->name, p)) != 0)
+			return err;
+		else
+			parport_ax_enable_irq(p);
+
 	request_region(p->base, p->size, p->name);
 	if (p->modes & PARPORT_MODE_PCECR)
 		request_region(p->base+0x400, 3, p->name);
@@ -281,12 +284,6 @@
 	return 0; /* FIXME */
 }
 
-int
-parport_ax_examine_irq(struct parport *p)
-{
-	return 0; /* FIXME */
-}
-
 void
 parport_ax_inc_use_count(void)
 {
@@ -355,7 +352,7 @@
 
 	parport_ax_enable_irq,
 	parport_ax_disable_irq,
-	parport_ax_examine_irq,
+	parport_ax_interrupt,
 
 	parport_ax_inc_use_count,
 	parport_ax_dec_use_count,

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