From: Johannes Zink <j.zink@pengutronix.de>
To: barebox@lists.infradead.org
Subject: Re: [PATCH 1/4] phy: fix deep probe support
Date: Thu, 07 Jul 2022 16:39:08 +0200 [thread overview]
Message-ID: <de4ce50868f4dad468c0929ac16d9be13d2fa4d1.camel@pengutronix.de> (raw)
In-Reply-To: <20220706142105.2266956-2-m.felsch@pengutronix.de>
On Wed, 2022-07-06 at 16:21 +0200, Marco Felsch wrote:
> Commit 9474a29003 ("phy: Add deep probe support") added the deep
> probe
> support but this commit was missing the of_phy_get_by_phandle() isn't
> calling the internal _of_phy_get() helper. Fix this by moving the
> of_device_ensure_probed() call into the of_phy_provider_lookup()
> helper
> which gets called by both functions.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> drivers/phy/phy-core.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> index b298da0000..ef7bd76648 100644
> --- a/drivers/phy/phy-core.c
> +++ b/drivers/phy/phy-core.c
> @@ -220,6 +220,11 @@ static struct phy_provider
> *of_phy_provider_lookup(struct device_node *node)
> {
> struct phy_provider *phy_provider;
> struct device_node *child;
> + int ret;
> +
> + ret = of_device_ensure_probed(node);
> + if (ret)
> + return ERR_PTR(ret);
>
> list_for_each_entry(phy_provider, &phy_provider_list, list) {
> if (phy_provider->dev->device_node == node)
> @@ -255,10 +260,6 @@ static struct phy *_of_phy_get(struct
> device_node *np, int index)
> if (ret)
> return ERR_PTR(-ENODEV);
>
> - ret = of_device_ensure_probed(args.np);
> - if (ret)
> - return ERR_PTR(ret);
> -
> phy_provider = of_phy_provider_lookup(args.np);
> if (IS_ERR(phy_provider)) {
> return ERR_CAST(phy_provider);
Tested-by: Johannes Zink <j.zink@pengutronix.de> # i.MX7
next prev parent reply other threads:[~2022-07-07 14:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 14:21 [PATCH 0/4] MX8MN-EVK DDR4 Support Marco Felsch
2022-07-06 14:21 ` [PATCH 1/4] phy: fix deep probe support Marco Felsch
2022-07-07 14:39 ` Johannes Zink [this message]
2022-07-06 14:21 ` [PATCH 2/4] phy: propagate error in of_phy_get_by_phandle Marco Felsch
2022-07-07 14:39 ` Johannes Zink
2022-07-06 14:21 ` [PATCH 3/4] usb: chipidea: imx: call enable_clk after all resources are requested Marco Felsch
2022-07-07 14:40 ` Johannes Zink
2022-07-06 14:21 ` [PATCH 4/4] ARM: i.MX8MN: pass along correct DT depending on variant Marco Felsch
2022-07-11 9:22 ` [PATCH 0/4] MX8MN-EVK DDR4 Support Sascha Hauer
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=de4ce50868f4dad468c0929ac16d9be13d2fa4d1.camel@pengutronix.de \
--to=j.zink@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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