diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2014-08-22 15:56:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-23 00:16:51 -0400 |
commit | a7d5f58d7dfb2f342ef7d676f58d1ec762ebb8ad (patch) | |
tree | 31f2b8d9394cdcc61c5be120b5b69a75ed0294c7 /drivers/net/phy | |
parent | 884cf705c7e60bc6ade7ddafcbe943af4dc84604 (diff) |
phylib: use MDIO_DEVS[12]
The bare register numbers are used despite <uapi/linux/mdio.h> has MDIO_DEVS[12]
#define'd for those.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index ca5ec3e18d36..3fc91e89f5a5 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -230,13 +230,13 @@ static int get_phy_c45_ids(struct mii_bus *bus, int addr, u32 *phy_id, | |||
230 | for (i = 1; | 230 | for (i = 1; |
231 | i < num_ids && c45_ids->devices_in_package == 0; | 231 | i < num_ids && c45_ids->devices_in_package == 0; |
232 | i++) { | 232 | i++) { |
233 | reg_addr = MII_ADDR_C45 | i << 16 | 6; | 233 | reg_addr = MII_ADDR_C45 | i << 16 | MDIO_DEVS2; |
234 | phy_reg = mdiobus_read(bus, addr, reg_addr); | 234 | phy_reg = mdiobus_read(bus, addr, reg_addr); |
235 | if (phy_reg < 0) | 235 | if (phy_reg < 0) |
236 | return -EIO; | 236 | return -EIO; |
237 | c45_ids->devices_in_package = (phy_reg & 0xffff) << 16; | 237 | c45_ids->devices_in_package = (phy_reg & 0xffff) << 16; |
238 | 238 | ||
239 | reg_addr = MII_ADDR_C45 | i << 16 | 5; | 239 | reg_addr = MII_ADDR_C45 | i << 16 | MDIO_DEVS1; |
240 | phy_reg = mdiobus_read(bus, addr, reg_addr); | 240 | phy_reg = mdiobus_read(bus, addr, reg_addr); |
241 | if (phy_reg < 0) | 241 | if (phy_reg < 0) |
242 | return -EIO; | 242 | return -EIO; |