Skip to content

Commit b9f0b2f

Browse files
Ajay Guptadavem330
authored andcommitted
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>
1 parent 623c8d5 commit b9f0b2f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,9 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
412412
*mac = NULL;
413413
}
414414

415-
rc = of_get_phy_mode(np, &plat->phy_interface);
416-
if (rc)
417-
return ERR_PTR(rc);
415+
plat->phy_interface = device_get_phy_mode(&pdev->dev);
416+
if (plat->phy_interface < 0)
417+
return ERR_PTR(plat->phy_interface);
418418

419419
plat->interface = stmmac_of_get_mac_mode(np);
420420
if (plat->interface < 0)

0 commit comments

Comments
 (0)