drivers/net: use nr_irqs
authorYinghai Lu <yhlu.kernel@gmail.com>
Wed, 20 Aug 2008 03:49:50 +0000 (20:49 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 16 Oct 2008 14:52:05 +0000 (16:52 +0200)
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
drivers/net/3c59x.c
drivers/net/hamradio/baycom_ser_fdx.c
drivers/net/hamradio/scc.c
drivers/net/wan/sbni.c

index 491ee16da5c13e27097d1dd58606ad15933af4bb..9ba295d9dd973b5713f7d49150a3807899ff3a77 100644 (file)
@@ -90,7 +90,7 @@ static int vortex_debug = 1;
 #include <linux/eisa.h>
 #include <linux/bitops.h>
 #include <linux/jiffies.h>
-#include <asm/irq.h>                   /* For NR_IRQS only. */
+#include <asm/irq.h>                   /* For nr_irqs only. */
 #include <asm/io.h>
 #include <asm/uaccess.h>
 
@@ -1221,7 +1221,7 @@ static int __devinit vortex_probe1(struct device *gendev,
        if (print_info)
                printk(", IRQ %d\n", dev->irq);
        /* Tell them about an invalid IRQ. */
-       if (dev->irq <= 0 || dev->irq >= NR_IRQS)
+       if (dev->irq <= 0 || dev->irq >= nr_irqs)
                printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n",
                           dev->irq);
 
index 17ac6975d70db9d0d1fdbe35487c03a2a1d1fa38..b6a816e60c0f74593b5e24d4cdded1115a6cc38b 100644 (file)
@@ -416,10 +416,10 @@ static int ser12_open(struct net_device *dev)
        if (!dev || !bc)
                return -ENXIO;
        if (!dev->base_addr || dev->base_addr > 0xffff-SER12_EXTENT ||
-           dev->irq < 2 || dev->irq > NR_IRQS) {
+           dev->irq < 2 || dev->irq > nr_irqs) {
                printk(KERN_INFO "baycom_ser_fdx: invalid portnumber (max %u) "
                                "or irq (2 <= irq <= %d)\n",
-                               0xffff-SER12_EXTENT, NR_IRQS);
+                               0xffff-SER12_EXTENT, nr_irqs);
                return -ENXIO;
        }
        if (bc->baud < 300 || bc->baud > 4800) {
index 45ae9d1191d7cb13db4ffb236c12595038f354f0..c17e39bc546007cda47673ead55580e4e6b22357 100644 (file)
@@ -1465,7 +1465,7 @@ static void z8530_init(void)
        printk(KERN_INFO "Init Z8530 driver: %u channels, IRQ", Nchips*2);
        
        flag=" ";
-       for (k = 0; k < NR_IRQS; k++)
+       for (k = 0; k < nr_irqs; k++)
                if (Ivec[k].used) 
                {
                        printk("%s%d", flag, k);
@@ -1728,7 +1728,7 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 
                        if (hwcfg.irq == 2) hwcfg.irq = 9;
 
-                       if (hwcfg.irq < 0 || hwcfg.irq >= NR_IRQS)
+                       if (hwcfg.irq < 0 || hwcfg.irq >= nr_irqs)
                                return -EINVAL;
                                
                        if (!Ivec[hwcfg.irq].used && hwcfg.irq)
@@ -2148,7 +2148,7 @@ static void __exit scc_cleanup_driver(void)
                }
                
        /* To unload the port must be closed so no real IRQ pending */
-       for (k=0; k < NR_IRQS ; k++)
+       for (k = 0; k < nr_irqs ; k++)
                if (Ivec[k].used) free_irq(k, NULL);
                
        local_irq_enable();
index f972fef87c98839a9d3c8e1fc4f7c2516ed01199..ee51b6a5e60569be9d955e2bb0259a5341d0f6f5 100644 (file)
@@ -318,7 +318,7 @@ sbni_pci_probe( struct net_device  *dev )
                                continue;
                }
 
-               if( pci_irq_line <= 0  ||  pci_irq_line >= NR_IRQS )
+               if (pci_irq_line <= 0 || pci_irq_line >= nr_irqs)
                        printk( KERN_WARNING "  WARNING: The PCI BIOS assigned "
                                "this PCI card to IRQ %d, which is unlikely "
                                "to work!.\n"