clk: versatile: clk-icst: Ensure clock names are unique

Commit 2d3de197a818 ("ARM: dts: arm: Update ICST clock nodes 'reg' and
node names") moved to using generic node names. That results in trying
to register multiple clocks with the same name. Fix this by including
the unit-address in the clock name.

Fixes: 2d3de197a818 ("ARM: dts: arm: Update ICST clock nodes 'reg' and node names")
Cc: stable@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-clk@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20211109164650.2233507-3-robh@kernel.org

+4 -2
+4 -2
drivers/clk/versatile/clk-icst.c
··· 484 struct device_node *parent; 485 struct regmap *map; 486 struct clk_icst_desc icst_desc; 487 - const char *name = np->name; 488 const char *parent_name; 489 struct clk *regclk; 490 enum icst_control_type ctype; ··· 533 icst_desc.params = &icst525_apcp_cm_params; 534 ctype = ICST_INTEGRATOR_CP_CM_MEM; 535 } else { 536 - pr_err("unknown ICST clock %s\n", name); 537 return; 538 } 539 540 /* Parent clock name is not the same as node parent */ 541 parent_name = of_clk_get_parent_name(np, 0); 542 543 regclk = icst_clk_setup(NULL, &icst_desc, name, parent_name, map, ctype); 544 if (IS_ERR(regclk)) { 545 pr_err("error setting up syscon ICST clock %s\n", name); 546 return; 547 }
··· 484 struct device_node *parent; 485 struct regmap *map; 486 struct clk_icst_desc icst_desc; 487 + const char *name; 488 const char *parent_name; 489 struct clk *regclk; 490 enum icst_control_type ctype; ··· 533 icst_desc.params = &icst525_apcp_cm_params; 534 ctype = ICST_INTEGRATOR_CP_CM_MEM; 535 } else { 536 + pr_err("unknown ICST clock %pOF\n", np); 537 return; 538 } 539 540 /* Parent clock name is not the same as node parent */ 541 parent_name = of_clk_get_parent_name(np, 0); 542 + name = kasprintf(GFP_KERNEL, "%pOFP", np); 543 544 regclk = icst_clk_setup(NULL, &icst_desc, name, parent_name, map, ctype); 545 if (IS_ERR(regclk)) { 546 + kfree(name); 547 pr_err("error setting up syscon ICST clock %s\n", name); 548 return; 549 }