提交 bed2f9ed 编写于 作者: F Florian Fainelli 提交者: David S. Miller

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: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2e79cb30
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册