Skip to content

Commit

Permalink
net: of_mdio: use PHY_MAX_ADDR constant
Browse files Browse the repository at this point in the history
Use the PHY_MAX_ADDR constant for checking if a MDIO bus address is
valid instead of using a plain "32".

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Dec 6, 2013
1 parent 2e79cb3 commit bed2f9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/of/of_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
}

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",
child->full_name, addr);
continue;
Expand Down

0 comments on commit bed2f9e

Please sign in to comment.