Blob Blame History Raw
From: Ajay Gupta <ajayg@nvidia.com>
Date: Wed, 22 Jan 2020 17:16:35 -0800
Subject: net: stmmac: platform: fix probe for ACPI devices

Git-commit: b9f0b2f634c0765999bec5547bc7a4ac08fda3ff
Patch-mainline: v5.5
References: bsc#1174072

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>
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -383,7 +383,7 @@ stmmac_probe_config_dt(struct platform_d
 		*mac = NULL;
 	}
 
-	plat->interface = of_get_phy_mode(np);
+	plat->interface = device_get_phy_mode(&pdev->dev);
 
 	/* Some wrapper drivers still rely on phy_node. Let's save it while
 	 * they are not converted to phylink. */