Commit b04d68eb authored by Darren Hart's avatar Darren Hart

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: default avatarDarren 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
parent 18afa4b0
...@@ -682,7 +682,7 @@ static int pch_gbe_init_phy(struct pch_gbe_adapter *adapter) ...@@ -682,7 +682,7 @@ static int pch_gbe_init_phy(struct pch_gbe_adapter *adapter)
} }
adapter->hw.phy.addr = adapter->mii.phy_id; adapter->hw.phy.addr = adapter->mii.phy_id;
netdev_dbg(netdev, "phy_addr = %d\n", 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; return -EAGAIN;
/* Selected the phy and isolate the rest */ /* Selected the phy and isolate the rest */
for (addr = 0; addr < PCH_GBE_PHY_REGS_LEN; addr++) { for (addr = 0; addr < PCH_GBE_PHY_REGS_LEN; addr++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment