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