Re: [PATCH 4/6] net: bcmgenet: Initial bcmgenet ACPI support

From: Andrew Lunn
Date: Sat Feb 01 2020 - 10:33:21 EST


> @@ -3595,7 +3597,7 @@ static int bcmgenet_probe(struct platform_device *pdev)
> /* If this is an internal GPHY, power it on now, before UniMAC is
> * brought out of reset as absolutely no UniMAC activity is allowed
> */
> - if (dn && !of_property_read_string(dn, "phy-mode", &phy_mode_str) &&
> + if (!device_property_read_string(&pdev->dev, "phy-mode", &phy_mode_str) &&
> !strcasecmp(phy_mode_str, "internal"))
> bcmgenet_power_up(priv, GENET_POWER_PASSIVE);

The code you are modifying appears to be old and out of date. For a
long time there has been a helper, of_get_phy_mode(). You should look
at fwnode_get_phy_mode().

Andrew