net: Use ARRAY_SIZE at appropriate places
[oweals/u-boot.git] / drivers / net / mcfmii.c
index 2f2269d5311e459d8734ef088590a4cf4d1f8d8f..17a780c854d8fbb8f6f393bd50083d37a92fa7d9 100644 (file)
@@ -170,7 +170,7 @@ int mii_discover_phy(struct eth_device *dev)
                        printf("PHY @ 0x%x pass %d\n", phyno, pass);
 #endif
 
-                       for (i = 0; (i < (sizeof(phyinfo) / sizeof(phy_info_t)))
+                       for (i = 0; (i < ARRAY_SIZE(phyinfo))
                                && (phyinfo[i].phyid != 0); i++) {
                                if (phyinfo[i].phyid == phytype) {
 #ifdef ET_DEBUG