|
@@ -211,7 +211,6 @@ static bool of_mdiobus_child_is_phy(struct device_node *child)
|
|
int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
|
|
int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
|
|
{
|
|
{
|
|
struct device_node *child;
|
|
struct device_node *child;
|
|
- const __be32 *paddr;
|
|
|
|
bool scanphys = false;
|
|
bool scanphys = false;
|
|
int addr, rc;
|
|
int addr, rc;
|
|
|
|
|
|
@@ -246,8 +245,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
|
|
/* auto scan for PHYs with empty reg property */
|
|
/* auto scan for PHYs with empty reg property */
|
|
for_each_available_child_of_node(np, child) {
|
|
for_each_available_child_of_node(np, child) {
|
|
/* Skip PHYs with reg property set */
|
|
/* Skip PHYs with reg property set */
|
|
- paddr = of_get_property(child, "reg", NULL);
|
|
|
|
- if (paddr)
|
|
|
|
|
|
+ if (of_find_property(child, "reg", NULL))
|
|
continue;
|
|
continue;
|
|
|
|
|
|
for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
|
|
for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
|