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: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Florian Fainelli 2013-12-05 14:52:11 -08:00 committed by David S. Miller
parent 2e79cb3030
commit bed2f9ed2f
1 changed files with 1 additions and 1 deletions

View File

@ -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;