aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cs89x0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cs89x0.c')
-rw-r--r--drivers/net/cs89x0.c6
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 {