From: Florian Fainelli Date: Thu, 5 Dec 2013 22:52:11 +0000 (-0800) Subject: net: of_mdio: use PHY_MAX_ADDR constant X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bed2f9ed2f3c4debe2e930c44ee95af980db7e20;p=linux-beck.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index 82485d2dac89..f93ebca0fcb7 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -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;