Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bed2f9ed authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller
Browse files

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: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2e79cb30
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;