Commit bed2f9ed authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: of_mdio: use PHY_MAX_ADDR constant

Use the PHY_MAX_ADDR constant for checking if a MDIO bus address is
valid instead of using a plain "32".
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2e79cb30
...@@ -107,7 +107,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) ...@@ -107,7 +107,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
} }
addr = be32_to_cpup(paddr); addr = be32_to_cpup(paddr);
if (addr >= 32) { if (addr >= PHY_MAX_ADDR) {
dev_err(&mdio->dev, "%s PHY address %i is too large\n", dev_err(&mdio->dev, "%s PHY address %i is too large\n",
child->full_name, addr); child->full_name, addr);
continue; continue;
......
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