From ff8ac60948ba819b89e9c87083e8050fc2f89999 Mon Sep 17 00:00:00 2001 From: Denis Cheng Date: Sun, 2 Sep 2007 18:30:18 +0800 Subject: drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE Signed-off-by: Denis Cheng Signed-off-by: Jeff Garzik --- drivers/net/fec_8xx/fec_mii.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/net/fec_8xx/fec_mii.c') 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); -- cgit v1.2.3