]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
phy: ti: j721e-wiz: Delete "clk_div_sel" clk provider during cleanup
authorKishon Vijay Abraham I <kishon@ti.com>
Wed, 10 Mar 2021 12:08:36 +0000 (17:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:42 +0000 (10:49 +0200)
[ Upstream commit 7e52a39f1942b771213678c56002ce90a2f126d2 ]

commit 091876cc355d ("phy: ti: j721e-wiz: Add support for WIZ module
present in TI J721E SoC") modeled both MUX clocks and DIVIDER clocks in
wiz. However during cleanup, it removed only the MUX clock provider.
Remove the DIVIDER clock provider here.

Fixes: 091876cc355d ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Link: https://lore.kernel.org/r/20210310120840.16447-3-kishon@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/ti/phy-j721e-wiz.c

index a75433b459dde4c8e76267732da5aa17652c3b64..e28e25f98708ca00f3bcebcc32fbac110eaa46dc 100644 (file)
@@ -615,6 +615,12 @@ static void wiz_clock_cleanup(struct wiz *wiz, struct device_node *node)
                of_clk_del_provider(clk_node);
                of_node_put(clk_node);
        }
+
+       for (i = 0; i < wiz->clk_div_sel_num; i++) {
+               clk_node = of_get_child_by_name(node, clk_div_sel[i].node_name);
+               of_clk_del_provider(clk_node);
+               of_node_put(clk_node);
+       }
 }
 
 static int wiz_clock_init(struct wiz *wiz, struct device_node *node)