drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE
[deliverable/linux.git] / drivers / net / fec_8xx / fec_mii.c
index b3fa0d6a159ce51f5490f16dcae58d03a927fbca..e8e10a02d202948429c4445e535cf6a0ffbb9f49 100644 (file)
@@ -308,12 +308,11 @@ int fec_mii_phy_id_detect(struct net_device *dev)
                return -1;
        }
 
-       for (i = 0, phy = phy_info; i < sizeof(phy_info) / sizeof(phy_info[0]);
-            i++, phy++)
+       for (i = 0, phy = phy_info; i < ARRAY_SIZE(phy_info); i++, phy++)
                if (phy->id == (phy_hwid >> 4) || phy->id == 0)
                        break;
 
-       if (i >= sizeof(phy_info) / sizeof(phy_info[0])) {
+       if (i >= ARRAY_SIZE(phy_info)) {
                printk(KERN_ERR DRV_MODULE_NAME
                       ": %s PHY id 0x%08x is not supported!\n",
                       dev->name, phy_hwid);
This page took 0.025026 seconds and 5 git commands to generate.