aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_mv.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2014-02-04 12:33:13 -0500
committerJason Cooper <jason@lakedaemon.net>2014-02-05 00:48:58 -0500
commit90aa2997029fa623fe9e3ec3a469a00a34130237 (patch)
tree2da9ff5ee00061ae2c39cccaea0905f60d317273 /drivers/ata/sata_mv.c
parent788a4d56ff378bff0b8e685d03a962b36903a149 (diff)
ata: sata_mv: Fix probe failures with optional phys
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> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r--drivers/ata/sata_mv.c8
1 files 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)
4126 clk_prepare_enable(hpriv->port_clks[port]); 4126 clk_prepare_enable(hpriv->port_clks[port]);
4127 4127
4128 sprintf(port_number, "port%d", port); 4128 sprintf(port_number, "port%d", port);
4129 hpriv->port_phys[port] = devm_phy_get(&pdev->dev, port_number); 4129 hpriv->port_phys[port] = devm_phy_optional_get(&pdev->dev,
4130 port_number);
4130 if (IS_ERR(hpriv->port_phys[port])) { 4131 if (IS_ERR(hpriv->port_phys[port])) {
4131 rc = PTR_ERR(hpriv->port_phys[port]); 4132 rc = PTR_ERR(hpriv->port_phys[port]);
4132 hpriv->port_phys[port] = NULL; 4133 hpriv->port_phys[port] = NULL;
4133 if ((rc != -EPROBE_DEFER) && (rc != -ENODEV)) 4134 if (rc != -EPROBE_DEFER)
4134 dev_warn(&pdev->dev, "error getting phy"); 4135 dev_warn(&pdev->dev, "error getting phy %d",
4136 rc);
4135 goto err; 4137 goto err;
4136 } else 4138 } else
4137 phy_power_on(hpriv->port_phys[port]); 4139 phy_power_on(hpriv->port_phys[port]);