diff options
author | Ajay Gupta <ajayg@nvidia.com> | 2020-01-23 04:16:35 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-25 12:09:47 +0300 |
commit | b9f0b2f634c0765999bec5547bc7a4ac08fda3ff (patch) | |
tree | b761caf0693911560640f9794ffe29c203cce03d /drivers/net/ethernet/stmicro | |
parent | 623c8d5c74c69a41573da5a38bb59e8652113f56 (diff) | |
download | linux-b9f0b2f634c0765999bec5547bc7a4ac08fda3ff.tar.xz |
net: stmmac: platform: fix probe for ACPI devices
Use generic device API to get phy mode to fix probe failure
with ACPI based devices.
Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) |