]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: of_mdio: use PHY_MAX_ADDR constant
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 5 Dec 2013 22:52:11 +0000 (14:52 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Dec 2013 19:57:20 +0000 (14:57 -0500)
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>
drivers/of/of_mdio.c

index 82485d2dac89a57caff4a4f3a6a63234595d487d..f93ebca0fcb7e046f623680f9eee67f83bfc590d 100644 (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;