Message ID | 20200123011635.15137-1-ajayg@nvidia.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | net: stmmac: platform: fix probe for ACPI devices | expand |
From: Ajay Gupta <ajaykuee@gmail.com> Date: Wed, 22 Jan 2020 17:16:35 -0800 > From: Ajay Gupta <ajayg@nvidia.com> > > Use generic device API to get phy mode to fix probe failure > with ACPI based devices. > > Signed-off-by: Ajay Gupta <ajayg@nvidia.com> Applied, thanks.
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 4775f49d7f3b..d10ac54bf385 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -412,9 +412,9 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) *mac = NULL; } - rc = of_get_phy_mode(np, &plat->phy_interface); - if (rc) - return ERR_PTR(rc); + plat->phy_interface = device_get_phy_mode(&pdev->dev); + if (plat->phy_interface < 0) + return ERR_PTR(plat->phy_interface); plat->interface = stmmac_of_get_mac_mode(np); if (plat->interface < 0)