aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fec_8xx
diff options
context:
space:
mode:
authorDenis Cheng <crquan@gmail.com>2007-09-02 06:30:18 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:15 -0400
commitff8ac60948ba819b89e9c87083e8050fc2f89999 (patch)
tree611975d22d7ddd8c49a073c61e6e4b7c9523fedb /drivers/net/fec_8xx
parent10d024c1b2fd58af8362670d7d6e5ae52fc33353 (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/fec_8xx')
-rw-r--r--drivers/net/fec_8xx/fec_mii.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/fec_8xx/fec_mii.c b/drivers/net/fec_8xx/fec_mii.c
index b3fa0d6a159c..e8e10a02d202 100644
--- a/drivers/net/fec_8xx/fec_mii.c
+++ b/drivers/net/fec_8xx/fec_mii.c
@@ -308,12 +308,11 @@ int fec_mii_phy_id_detect(struct net_device *dev)
308 return -1; 308 return -1;
309 } 309 }
310 310
311 for (i = 0, phy = phy_info; i < sizeof(phy_info) / sizeof(phy_info[0]); 311 for (i = 0, phy = phy_info; i < ARRAY_SIZE(phy_info); i++, phy++)
312 i++, phy++)
313 if (phy->id == (phy_hwid >> 4) || phy->id == 0) 312 if (phy->id == (phy_hwid >> 4) || phy->id == 0)
314 break; 313 break;
315 314
316 if (i >= sizeof(phy_info) / sizeof(phy_info[0])) { 315 if (i >= ARRAY_SIZE(phy_info)) {
317 printk(KERN_ERR DRV_MODULE_NAME 316 printk(KERN_ERR DRV_MODULE_NAME
318 ": %s PHY id 0x%08x is not supported!\n", 317 ": %s PHY id 0x%08x is not supported!\n",
319 dev->name, phy_hwid); 318 dev->name, phy_hwid);