From: Ajay Gupta <ajaykuee@gmail.com>
To: davem@davemloft.net, mcoquelin.stm32@gmail.com
Cc: netdev@vger.kernel.org, joabreu@synopsys.com,
peppe.cavallaro@st.com, alexandre.torgue@st.com,
Ajay Gupta <ajayg@nvidia.com>
Subject: [PATCH] net: stmmac: platform: fix probe for ACPI devices
Date: Wed, 22 Jan 2020 17:16:35 -0800 [thread overview]
Message-ID: <20200123011635.15137-1-ajayg@nvidia.com> (raw)
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>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 6 +++---
1 file 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)
--
2.17.1
next reply other threads:[~2020-01-23 18:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 1:16 Ajay Gupta [this message]
2020-01-25 9:10 ` [PATCH] net: stmmac: platform: fix probe for ACPI devices David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200123011635.15137-1-ajayg@nvidia.com \
--to=ajaykuee@gmail.com \
--cc=ajayg@nvidia.com \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=joabreu@synopsys.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).