aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 75c97396dbfa..527e744a3809 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -87,10 +87,15 @@ static struct phy *phy_lookup(struct device *device, const char *port)
87static struct phy_provider *of_phy_provider_lookup(struct device_node *node) 87static struct phy_provider *of_phy_provider_lookup(struct device_node *node)
88{ 88{
89 struct phy_provider *phy_provider; 89 struct phy_provider *phy_provider;
90 struct device_node *child;
90 91
91 list_for_each_entry(phy_provider, &phy_provider_list, list) { 92 list_for_each_entry(phy_provider, &phy_provider_list, list) {
92 if (phy_provider->dev->of_node == node) 93 if (phy_provider->dev->of_node == node)
93 return phy_provider; 94 return phy_provider;
95
96 for_each_child_of_node(phy_provider->dev->of_node, child)
97 if (child == node)
98 return phy_provider;
94 } 99 }
95 100
96 return ERR_PTR(-EPROBE_DEFER); 101 return ERR_PTR(-EPROBE_DEFER);