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

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

diff -u --recursive --new-file v2.1.59/linux/drivers/net/cs89x0.c linux/drivers/net/cs89x0.c
@@ -605,10 +605,10 @@
 		/* Allow interrupts to be generated by the chip */
 		writereg(dev, PP_BusCTL, ENABLE_IRQ | MEMORY_ON);
 		for (i = 2; i < CS8920_NO_INTS; i++) if ((1 << dev->irq) & lp->irq_map) {
-			if (request_irq (i, NULL, 0, "cs8920", NULL) != -EBUSY) {
+			if (request_irq (i, NULL, 0, "cs8920", dev) != -EBUSY) {
 				write_irq(dev, lp->chip_type, i);
 				writereg(dev, PP_BufCFG, GENERATE_SW_INTERRUPT);
-				if (request_irq (dev->irq = i, &net_interrupt, 0, "cs89x0", NULL) == 0)
+				if (request_irq (dev->irq = i, &net_interrupt, 0, "cs89x0", dev) == 0)
 					break;
 			}
 		}
@@ -626,13 +626,11 @@
 		}
 		writereg(dev, PP_BusCTL, ENABLE_IRQ | MEMORY_ON);
 		write_irq(dev, lp->chip_type, dev->irq);
-		if (request_irq(dev->irq, &net_interrupt, 0, "cs89x0", NULL)) {
+		if (request_irq(dev->irq, &net_interrupt, 0, "cs89x0", dev)) {
 			return -EAGAIN;
 		}
 	}
 
-	irq2dev_map[dev->irq] = dev;
-
 	/* set the Ethernet address */
 	for (i=0; i < ETH_ALEN/2; i++)
 		writereg(dev, PP_IA+i*2, dev->dev_addr[i*2] | (dev->dev_addr[i*2+1] << 8));
@@ -658,7 +656,6 @@
         release_irq:
                 writereg(dev, PP_LineCTL, readreg(dev, PP_LineCTL) & ~(SERIAL_TX_ON | SERIAL_RX_ON));
                 free_irq(dev->irq, NULL);
-                irq2dev_map[dev->irq] = 0;
 		return -EAGAIN;
 	}
 
@@ -794,7 +791,7 @@
    Handle the network interface interrupts. */
 static void net_interrupt(int irq, void *dev_id, struct pt_regs * regs)
 {
-	struct device *dev = (struct device *)(irq2dev_map[irq]);
+	struct device *dev = dev_id;
 	struct net_local *lp;
 	int ioaddr, status;
 
@@ -922,8 +919,6 @@
 	dev->start = 0;
 
 	free_irq(dev->irq, NULL);
-
-	irq2dev_map[dev->irq] = 0;
 
 	/* Update the statistics here. */
 

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