summaryrefslogtreecommitdiff
path: root/drivers/net/fec_8xx
diff options
context:
space:
mode:
authorDenis Cheng <crquan@gmail.com>2007-09-02 18:30:18 +0800
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:51:15 -0700
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)
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);