summaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-02-19 23:29:22 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-02-22 08:11:18 +0100
commitf30b6e70e956d3f7986a19bdfabb401142425777 (patch)
treed265614a5a8305d249734d13b6d224b2498e23f7 /drivers/phy
parent3c5317e9046c86aa0bbba402b2b1fd173fd4774e (diff)
downloadbarebox-f30b6e70e956d3f7986a19bdfabb401142425777.tar.gz
phy: core: Assume EPROBE_DEFER in of_phy_provider_lookup()
In order to support PHY driver probe deferral change the code to assume EPROBE_DEFER instead of ENODEV when requested PHY is missing from phy_provider_list. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 9d6288f..066a887 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -227,7 +227,7 @@ static struct phy_provider *of_phy_provider_lookup(struct device_node *node)
return phy_provider;
}
- return ERR_PTR(-ENODEV);
+ return ERR_PTR(-EPROBE_DEFER);
}
/**
@@ -254,7 +254,7 @@ static struct phy *_of_phy_get(struct device_node *np, int index)
phy_provider = of_phy_provider_lookup(args.np);
if (IS_ERR(phy_provider)) {
- return ERR_PTR(-ENODEV);
+ return ERR_CAST(phy_provider);
}
return phy_provider->of_xlate(phy_provider->dev, &args);