patch-2.1.60 linux/drivers/net/eepro.c

Next file: linux/drivers/net/eepro100.c
Previous file: linux/drivers/net/e2100.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.59/linux/drivers/net/eepro.c linux/drivers/net/eepro.c
@@ -420,7 +420,7 @@
 			if (dev->irq > 2) {
 				printk(", IRQ %d, %s.\n", dev->irq,
 						ifmap[dev->if_port]);
-				if (request_irq(dev->irq, &eepro_interrupt, 0, "eepro", NULL)) {
+				if (request_irq(dev->irq, &eepro_interrupt, 0, "eepro", dev)) {
 					printk("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
 					return -EAGAIN;
 				}
@@ -513,7 +513,7 @@
 			outb(DIAGNOSE_CMD, ioaddr); /* RESET the 82595 */
 
 			if (*irqp == autoirq_report(2) &&  /* It's a good IRQ line */
-				(request_irq(dev->irq = *irqp, &eepro_interrupt, 0, "eepro", NULL) == 0))
+				(request_irq(dev->irq = *irqp, &eepro_interrupt, 0, "eepro", dev) == 0))
 					break;
 
 			/* clear all interrupts */
@@ -560,10 +560,6 @@
 		return -EAGAIN;
 	}
 
-	if (irq2dev_map[dev->irq] != 0
-		|| (irq2dev_map[dev->irq] = dev) == 0)
-		return -EAGAIN;
-
 	/* Initialize the 82595. */
 
 	outb(BANK2_SELECT, ioaddr); /* be CAREFUL, BANK 2 now */
@@ -741,7 +737,7 @@
 static void
 eepro_interrupt(int irq, void *dev_id, struct pt_regs * regs)
 {
-	struct device *dev = (struct device *)(irq2dev_map[irq]);
+	struct device *dev = dev_id;
 	int ioaddr, status, boguscount = 20;
 
 	if (net_debug > 5)
@@ -824,8 +820,6 @@
 
 	/* release the interrupt */
 	free_irq(dev->irq, NULL);
-
-	irq2dev_map[dev->irq] = 0;
 
 	/* Update the statistics here. What statistics? */
 

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