Selaa lähdekoodia

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>
Florian Fainelli 12 vuotta sitten
vanhempi
commit
bed2f9ed2f
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      drivers/of/of_mdio.c

+ 1 - 1
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);
 		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",
 			dev_err(&mdio->dev, "%s PHY address %i is too large\n",
 				child->full_name, addr);
 				child->full_name, addr);
 			continue;
 			continue;