Skip to contentSkip to conversation

clk: ti: dra7-atl-clock: Remove ti_clk_add_alias call

PATCH Applied Peter Ujfalusi 3 participants 3 messages Oct 2, 2019 – Nov 4, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 clk: ti: dra7-atl-clock: Remove ti_clk_add_alias call

ti_clk_register() calls it already so the driver should not create duplicated alias.

---
Hi,

changes since v1:
- removed unused ret variable

Regards,
Peter

 drivers/clk/ti/clk-dra7-atl.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/clk/ti/clk-dra7-atl.c +0 -6
index a01ca9395179..f65e16c4f3c4 100644
@@ -174,7 +174,6 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node)
 	struct clk_init_data init = { NULL };
 	const char **parent_names = NULL;
 	struct clk *clk;
-	int ret;
 
 	clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
 	if (!clk_hw) {
@@ -207,11 +206,6 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node)
 	clk = ti_clk_register(NULL, &clk_hw->hw, node->name);
 
 	if (!IS_ERR(clk)) {
-		ret = ti_clk_add_alias(NULL, clk, node->name);
-		if (ret) {
-			clk_unregister(clk);
-			goto cleanup;
-		}
 		of_clk_add_provider(node, of_clk_src_simple_get, clk);
 		kfree(parent_names);
 		return;
Signature · 4 lines
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Applied
#1 lore raw
Quoted 10 lines · Peter Ujfalusi

ti_clk_register() calls it already so the driver should not create duplicated alias.

---
Hi,

changes since v1:
- removed unused ret variable

Queued up for 5.4 fixes, thanks.

-Tero

Quoted 21 lines

Regards,
Peter

  drivers/clk/ti/clk-dra7-atl.c | 6 ------
  1 file changed, 6 deletions(-)
drivers/clk/ti/clk-dra7-atl.c +0 -1
index a01ca9395179..f65e16c4f3c4 100644
@@ -174,7 +174,6 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node)
  	struct clk_init_data init = { NULL };
  	const char **parent_names = NULL;
  	struct clk *clk;
-	int ret;
 
  	clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
  	if (!clk_hw) {
@@ -207,11 +206,6 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node)
  	clk = ti_clk_register(NULL, &clk_hw->hw, node->name);

drivers/clk/ti/clk-dra7-atl.c static void __init of_dra7_atl_clock_setup(struct device_node *node) · line 211

Quoted 10 lines
drivers/clk/ti/clk-dra7-atl.c +0 -5
 
  	if (!IS_ERR(clk)) {
-		ret = ti_clk_add_alias(NULL, clk, node->name);
-		if (ret) {
-			clk_unregister(clk);
-			goto cleanup;
-		}
  		of_clk_add_provider(node, of_clk_src_simple_get, clk);
  		kfree(parent_names);
  		return;

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki