summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/oki-semi
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2013-05-19 01:45:55 +0400
committerDarren Hart <dvhart@linux.intel.com>2013-07-25 08:29:36 +0400
commitb04d68ebb04aa2d4ab9392c5353a53c81be7b847 (patch)
treef505535fc1e9ab176823ba3eef878153a08949d5 /drivers/net/ethernet/oki-semi
parent18afa4b028b46f8b45ca64f94aefe717c297b07d (diff)
downloadlinux-b04d68ebb04aa2d4ab9392c5353a53c81be7b847.tar.xz
pch_gbe: Use PCH_GBE_PHY_REGS_LEN instead of 32
Avoid using magic numbers when we have perfectly good defines just lying around. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: netdev@vger.kernel.org
Diffstat (limited to 'drivers/net/ethernet/oki-semi')
-rw-r--r--drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index ab1039a95bf9..749ddd918282 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -682,7 +682,7 @@ static int pch_gbe_init_phy(struct pch_gbe_adapter *adapter)
}
adapter->hw.phy.addr = adapter->mii.phy_id;
netdev_dbg(netdev, "phy_addr = %d\n", adapter->mii.phy_id);
- if (addr == 32)
+ if (addr == PCH_GBE_PHY_REGS_LEN)
return -EAGAIN;
/* Selected the phy and isolate the rest */
for (addr = 0; addr < PCH_GBE_PHY_REGS_LEN; addr++) {