linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Andrew Lunn <andrew@lunn.ch>, tj@kernel.org
Cc: Jason Cooper <jason@lakedaemon.net>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	linux-ide@vger.kernel.org
Subject: Re: [Patch v4 3/3] ata: sata_mv: Fix probe failures with optional phys
Date: Wed, 5 Feb 2014 11:00:24 +0530	[thread overview]
Message-ID: <52F1CC70.4080605@ti.com> (raw)
In-Reply-To: <1391535193-24165-3-git-send-email-andrew@lunn.ch>

On Tuesday 04 February 2014 11:03 PM, Andrew Lunn wrote:
> Make use of devm_phy_optional_get() in order to fix probe failures on
> Armada 370, XP and others, when there is no phy driver available.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> v2
>  No change
> v3
>  Fix commit log devm_get_optional->devm_option_get.
> v4
>  Add Tested-by: & Acked-by:
>  Fix comment again.
> ---
>  drivers/ata/sata_mv.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
> index 20a7517bd339..52b8181ddafd 100644
> --- a/drivers/ata/sata_mv.c
> +++ b/drivers/ata/sata_mv.c
> @@ -4126,12 +4126,14 @@ static int mv_platform_probe(struct platform_device *pdev)
>  			clk_prepare_enable(hpriv->port_clks[port]);
>  
>  		sprintf(port_number, "port%d", port);
> -		hpriv->port_phys[port] = devm_phy_get(&pdev->dev, port_number);
> +		hpriv->port_phys[port] = devm_phy_optional_get(&pdev->dev,
> +							       port_number);
>  		if (IS_ERR(hpriv->port_phys[port])) {
>  			rc = PTR_ERR(hpriv->port_phys[port]);
>  			hpriv->port_phys[port] = NULL;
> -			if ((rc != -EPROBE_DEFER) && (rc != -ENODEV))
> -				dev_warn(&pdev->dev, "error getting phy");
> +			if (rc != -EPROBE_DEFER)
> +				dev_warn(&pdev->dev, "error getting phy %d",
> +					rc);
>  			goto err;
>  		} else
>  			phy_power_on(hpriv->port_phys[port]);
> 


  reply	other threads:[~2014-02-05  5:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04 17:33 [Patch v4 1/3] drivers: phy: Make NULL a valid phy reference Andrew Lunn
2014-02-04 17:33 ` [Patch v4 2/3] drivers: phy: Add support for optional phys Andrew Lunn
2014-02-05  5:20   ` Kishon Vijay Abraham I
2014-02-04 17:33 ` [Patch v4 3/3] ata: sata_mv: Fix probe failures with " Andrew Lunn
2014-02-05  5:30   ` Kishon Vijay Abraham I [this message]
2014-02-05  5:14 ` [Patch v4 1/3] drivers: phy: Make NULL a valid phy reference Jason Cooper
2014-02-05  5:19   ` Kishon Vijay Abraham I
2014-02-05  5:22     ` Jason Cooper
2014-02-05  5:20 ` Kishon Vijay Abraham I
2014-02-05  5:52 ` Jason Cooper

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=52F1CC70.4080605@ti.com \
    --to=kishon@ti.com \
    --cc=andrew@lunn.ch \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=tj@kernel.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;
as well as URLs for NNTP newsgroup(s).