aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fec_8xx
diff options
context:
space:
mode:
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);