aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/of_mdio.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2013-12-05 17:52:11 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-06 14:57:20 -0500
commitbed2f9ed2f3c4debe2e930c44ee95af980db7e20 (patch)
treeb408aa376797759a83285419fd3186fc34899ef8 /drivers/of/of_mdio.c
parent2e79cb303010d5d2b7810c11bc5d1f09a8500405 (diff)
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>
Diffstat (limited to 'drivers/of/of_mdio.c')
-rw-r--r--drivers/of/of_mdio.c2
1 files changed, 1 insertions, 1 deletions
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)
107 } 107 }
108 108
109 addr = be32_to_cpup(paddr); 109 addr = be32_to_cpup(paddr);
110 if (addr >= 32) { 110 if (addr >= PHY_MAX_ADDR) {
111 dev_err(&mdio->dev, "%s PHY address %i is too large\n", 111 dev_err(&mdio->dev, "%s PHY address %i is too large\n",
112 child->full_name, addr); 112 child->full_name, addr);
113 continue; 113 continue;