aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:49:50 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:05 -0400
commit60e4ad7a72fd7ce562cdf8dd850289e1e76bc1b1 (patch)
tree8d105cf96a58cafc668174daf6501f9ef0ad1481
parent1f45f5621df82033cb4964d03530ade2f9a25e7b (diff)
drivers/net: use nr_irqs
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--drivers/net/3c59x.c4
-rw-r--r--drivers/net/hamradio/baycom_ser_fdx.c4
-rw-r--r--drivers/net/hamradio/scc.c6
-rw-r--r--drivers/net/wan/sbni.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 491ee16da5c1..9ba295d9dd97 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -90,7 +90,7 @@ static int vortex_debug = 1;
90#include <linux/eisa.h> 90#include <linux/eisa.h>
91#include <linux/bitops.h> 91#include <linux/bitops.h>
92#include <linux/jiffies.h> 92#include <linux/jiffies.h>
93#include <asm/irq.h> /* For NR_IRQS only. */ 93#include <asm/irq.h> /* For nr_irqs only. */
94#include <asm/io.h> 94#include <asm/io.h>
95#include <asm/uaccess.h> 95#include <asm/uaccess.h>
96 96
@@ -1221,7 +1221,7 @@ static int __devinit vortex_probe1(struct device *gendev,
1221 if (print_info) 1221 if (print_info)
1222 printk(", IRQ %d\n", dev->irq); 1222 printk(", IRQ %d\n", dev->irq);
1223 /* Tell them about an invalid IRQ. */ 1223 /* Tell them about an invalid IRQ. */
1224 if (dev->irq <= 0 || dev->irq >= NR_IRQS) 1224 if (dev->irq <= 0 || dev->irq >= nr_irqs)
1225 printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n", 1225 printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n",
1226 dev->irq); 1226 dev->irq);
1227 1227
diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c
index 17ac6975d70d..b6a816e60c0f 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -416,10 +416,10 @@ static int ser12_open(struct net_device *dev)
416 if (!dev || !bc) 416 if (!dev || !bc)
417 return -ENXIO; 417 return -ENXIO;
418 if (!dev->base_addr || dev->base_addr > 0xffff-SER12_EXTENT || 418 if (!dev->base_addr || dev->base_addr > 0xffff-SER12_EXTENT ||
419 dev->irq < 2 || dev->irq > NR_IRQS) { 419 dev->irq < 2 || dev->irq > nr_irqs) {
420 printk(KERN_INFO "baycom_ser_fdx: invalid portnumber (max %u) " 420 printk(KERN_INFO "baycom_ser_fdx: invalid portnumber (max %u) "
421 "or irq (2 <= irq <= %d)\n", 421 "or irq (2 <= irq <= %d)\n",
422 0xffff-SER12_EXTENT, NR_IRQS); 422 0xffff-SER12_EXTENT, nr_irqs);
423 return -ENXIO; 423 return -ENXIO;
424 } 424 }
425 if (bc->baud < 300 || bc->baud > 4800) { 425 if (bc->baud < 300 || bc->baud > 4800) {
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index 45ae9d1191d7..c17e39bc5460 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1465,7 +1465,7 @@ static void z8530_init(void)
1465 printk(KERN_INFO "Init Z8530 driver: %u channels, IRQ", Nchips*2); 1465 printk(KERN_INFO "Init Z8530 driver: %u channels, IRQ", Nchips*2);
1466 1466
1467 flag=" "; 1467 flag=" ";
1468 for (k = 0; k < NR_IRQS; k++) 1468 for (k = 0; k < nr_irqs; k++)
1469 if (Ivec[k].used) 1469 if (Ivec[k].used)
1470 { 1470 {
1471 printk("%s%d", flag, k); 1471 printk("%s%d", flag, k);
@@ -1728,7 +1728,7 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1728 1728
1729 if (hwcfg.irq == 2) hwcfg.irq = 9; 1729 if (hwcfg.irq == 2) hwcfg.irq = 9;
1730 1730
1731 if (hwcfg.irq < 0 || hwcfg.irq >= NR_IRQS) 1731 if (hwcfg.irq < 0 || hwcfg.irq >= nr_irqs)
1732 return -EINVAL; 1732 return -EINVAL;
1733 1733
1734 if (!Ivec[hwcfg.irq].used && hwcfg.irq) 1734 if (!Ivec[hwcfg.irq].used && hwcfg.irq)
@@ -2148,7 +2148,7 @@ static void __exit scc_cleanup_driver(void)
2148 } 2148 }
2149 2149
2150 /* To unload the port must be closed so no real IRQ pending */ 2150 /* To unload the port must be closed so no real IRQ pending */
2151 for (k=0; k < NR_IRQS ; k++) 2151 for (k = 0; k < nr_irqs ; k++)
2152 if (Ivec[k].used) free_irq(k, NULL); 2152 if (Ivec[k].used) free_irq(k, NULL);
2153 2153
2154 local_irq_enable(); 2154 local_irq_enable();
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index f972fef87c98..ee51b6a5e605 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -318,7 +318,7 @@ sbni_pci_probe( struct net_device *dev )
318 continue; 318 continue;
319 } 319 }
320 320
321 if( pci_irq_line <= 0 || pci_irq_line >= NR_IRQS ) 321 if (pci_irq_line <= 0 || pci_irq_line >= nr_irqs)
322 printk( KERN_WARNING " WARNING: The PCI BIOS assigned " 322 printk( KERN_WARNING " WARNING: The PCI BIOS assigned "
323 "this PCI card to IRQ %d, which is unlikely " 323 "this PCI card to IRQ %d, which is unlikely "
324 "to work!.\n" 324 "to work!.\n"