diff options
author | Denis Cheng <crquan@gmail.com> | 2007-09-02 06:30:18 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:15 -0400 |
commit | ff8ac60948ba819b89e9c87083e8050fc2f89999 (patch) | |
tree | 611975d22d7ddd8c49a073c61e6e4b7c9523fedb /drivers/net/cs89x0.c | |
parent | 10d024c1b2fd58af8362670d7d6e5ae52fc33353 (diff) |
drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/cs89x0.c')
-rw-r--r-- | drivers/net/cs89x0.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 2b4c92193912..4cf82cf5ac10 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -805,7 +805,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) | |||
805 | i = cs8900_irq_map[0]; | 805 | i = cs8900_irq_map[0]; |
806 | #else | 806 | #else |
807 | /* Translate the IRQ using the IRQ mapping table. */ | 807 | /* Translate the IRQ using the IRQ mapping table. */ |
808 | if (i >= sizeof(cs8900_irq_map)/sizeof(cs8900_irq_map[0])) | 808 | if (i >= ARRAY_SIZE(cs8900_irq_map)) |
809 | printk("\ncs89x0: invalid ISA interrupt number %d\n", i); | 809 | printk("\ncs89x0: invalid ISA interrupt number %d\n", i); |
810 | else | 810 | else |
811 | i = cs8900_irq_map[i]; | 811 | i = cs8900_irq_map[i]; |
@@ -1246,11 +1246,11 @@ write_irq(struct net_device *dev, int chip_type, int irq) | |||
1246 | 1246 | ||
1247 | if (chip_type == CS8900) { | 1247 | if (chip_type == CS8900) { |
1248 | /* Search the mapping table for the corresponding IRQ pin. */ | 1248 | /* Search the mapping table for the corresponding IRQ pin. */ |
1249 | for (i = 0; i != sizeof(cs8900_irq_map)/sizeof(cs8900_irq_map[0]); i++) | 1249 | for (i = 0; i != ARRAY_SIZE(cs8900_irq_map); i++) |
1250 | if (cs8900_irq_map[i] == irq) | 1250 | if (cs8900_irq_map[i] == irq) |
1251 | break; | 1251 | break; |
1252 | /* Not found */ | 1252 | /* Not found */ |
1253 | if (i == sizeof(cs8900_irq_map)/sizeof(cs8900_irq_map[0])) | 1253 | if (i == ARRAY_SIZE(cs8900_irq_map)) |
1254 | i = 3; | 1254 | i = 3; |
1255 | writereg(dev, PP_CS8900_ISAINT, i); | 1255 | writereg(dev, PP_CS8900_ISAINT, i); |
1256 | } else { | 1256 | } else { |