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

From: Jeremy Linton
Date: Sat Feb 01 2020 - 14:09:07 EST


Hi,

On 2/1/20 9:33 AM, Andrew Lunn wrote:
@@ -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().

Yes, thanks, I did that in the other phy path but not here.