mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] phy: Return NULL if the phy is optional
Date: Wed, 18 Oct 2017 16:42:51 +0530	[thread overview]
Message-ID: <796c0230-d018-e3e0-23d3-9f5f2406e5e3@ti.com> (raw)
In-Reply-To: <20170904125313.21159-1-maxime.ripard@free-electrons.com>



On Monday 04 September 2017 06:23 PM, Maxime Ripard wrote:
> If we're trying to get a handle to an optional phy, then the phy framework
> being disabled shouldn't return an hard error.
> 
> Instead, return NULL just like phy_optional_get does when there's no phy
> provided in the DT.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

merged, thanks!

-Kishon
> ---
>  include/linux/phy/phy.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
> index 78bb0d7f6b11..76487b8d74ea 100644
> --- a/include/linux/phy/phy.h
> +++ b/include/linux/phy/phy.h
> @@ -289,7 +289,7 @@ static inline struct phy *devm_phy_get(struct device *dev, const char *string)
>  static inline struct phy *devm_phy_optional_get(struct device *dev,
>  						const char *string)
>  {
> -	return ERR_PTR(-ENOSYS);
> +	return NULL;
>  }
>  
>  static inline struct phy *devm_of_phy_get(struct device *dev,
> 

      reply	other threads:[~2017-10-18 11:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04 12:53 Maxime Ripard
2017-10-18 11:12 ` Kishon Vijay Abraham I [this message]

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=796c0230-d018-e3e0-23d3-9f5f2406e5e3@ti.com \
    --to=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.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

all inboxes | Powered by JetHome®