aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <[email protected]>2021-03-19 18:11:18 +0530
committerVinod Koul <[email protected]>2021-03-31 16:42:51 +0530
commit03ada5a37c3a98396026c98015d18337c88b09b3 (patch)
treee8a5f621c79ca28c24fa31fec2372aa7fd87b7f6
parentf7eb147d306ad2efae6837e20d2944f03be42eb4 (diff)
phy: cadence: Sierra: Create PHY only for "phy" or "link" sub-nodes
Cadence Sierra PHY driver registers PHY using devm_phy_create() for all sub-nodes of Sierra device tree node. However Sierra device tree node can have sub-nodes for the various clocks in addtion to the PHY. Use devm_phy_create() only for nodes with name "phy" (or "link" for old device tree) which represent the actual PHY. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Reviewed-by: Swapnil Jakhade <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
-rw-r--r--drivers/phy/cadence/phy-cadence-sierra.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c
index 19f32ae877b9..f7ba0ed416bc 100644
--- a/drivers/phy/cadence/phy-cadence-sierra.c
+++ b/drivers/phy/cadence/phy-cadence-sierra.c
@@ -577,6 +577,10 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev)
for_each_available_child_of_node(dn, child) {
struct phy *gphy;
+ if (!(of_node_name_eq(child, "phy") ||
+ of_node_name_eq(child, "link")))
+ continue;
+
sp->phys[node].lnk_rst =
of_reset_control_array_get_exclusive(child);