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

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

diff -u --recursive --new-file v2.1.59/linux/drivers/net/wavelan.c linux/drivers/net/wavelan.c
@@ -3666,14 +3666,7 @@
   u_short	status;
   u_short	ack_cmd;
 
-  if((dev = (device *) (irq2dev_map[irq])) == (device *) NULL)
-    {
-#ifdef DEBUG_INTERRUPT_ERROR
-      printk(KERN_WARNING "wavelan_interrupt(): irq %d for unknown device.\n",
-	     irq);
-#endif
-      return;
-    }
+  dev = dev_id;
 
 #ifdef DEBUG_INTERRUPT_TRACE
   printk(KERN_DEBUG "%s: ->wavelan_interrupt()\n", dev->name);
@@ -3913,12 +3906,8 @@
       return -ENXIO;
     }
 
-  if((irq2dev_map[dev->irq] != (device *) NULL) ||
-     /* This is always true, but avoid the false IRQ. */
-     ((irq2dev_map[dev->irq] = dev) == (device *) NULL) ||
-     (request_irq(dev->irq, &wavelan_interrupt, 0, "WaveLAN", NULL) != 0))
+  if(request_irq(dev->irq, &wavelan_interrupt, 0, "WaveLAN", dev) != 0)
     {
-      irq2dev_map[dev->irq] = (device *) NULL;
 #ifdef DEBUG_CONFIG_ERRORS
       printk(KERN_WARNING "%s: wavelan_open(): invalid irq\n", dev->name);
 #endif
@@ -3934,7 +3923,6 @@
   else
     {
       free_irq(dev->irq, NULL);
-      irq2dev_map[dev->irq] = (device *) NULL;
 #ifdef DEBUG_CONFIG_ERRORS
       printk(KERN_INFO "%s: wavelan_open(): impossible to start the card\n",
 	     dev->name);
@@ -3983,7 +3971,6 @@
   wv_82586_stop(dev);
 
   free_irq(dev->irq, NULL);
-  irq2dev_map[dev->irq] = (device *) NULL;
 
   MOD_DEC_USE_COUNT;
 

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