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

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

diff -u --recursive --new-file v2.1.59/linux/drivers/net/atp.c linux/drivers/net/atp.c
@@ -327,9 +327,7 @@
 	/* The interrupt line is turned off (tri-stated) when the device isn't in
 	   use.  That's especially important for "attached" interfaces where the
 	   port or interrupt may be shared. */
-	if (irq2dev_map[dev->irq] != 0
-		|| (irq2dev_map[dev->irq] = dev) == 0
-		|| request_irq(dev->irq, &net_interrupt, 0, "ATP", NULL)) {
+	if (request_irq(dev->irq, &net_interrupt, 0, "ATP", dev)) {
 		return -EAGAIN;
 	}
 
@@ -479,7 +477,7 @@
 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, boguscount = 20;
 	static int num_tx_since_rx = 0;
@@ -730,7 +728,6 @@
 	/* Free the IRQ line. */
 	outb(0x00, ioaddr + PAR_CONTROL);
 	free_irq(dev->irq, NULL);
-	irq2dev_map[dev->irq] = 0;
 
 	/* Leave the hardware in a reset state. */
     write_reg_high(ioaddr, CMR1, CMR1h_RESET);

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