Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: ti: clkctrl: replace dashes from clkdm name with underscore

The change in the DTS data node naming prevents using underscore
within the node names and force usage of dash instead. On the other
hand, clockdomains use underscore instead of dash, so this must be
replaced within the driver code so that the mapping between the two
can be done properly.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>

+10
+10
drivers/clk/ti/clkctrl.c
··· 445 445 const __be32 *addrp; 446 446 u32 addr; 447 447 int ret; 448 + char *c; 448 449 449 450 if (!(ti_clk_get_features()->flags & TI_CLK_CLKCTRL_COMPAT) && 450 451 !strcmp(node->name, "clk")) ··· 532 531 } 533 532 534 533 strcat(provider->clkdm_name, "clkdm"); 534 + 535 + /* Replace any dash from the clkdm name with underscore */ 536 + c = provider->clkdm_name; 537 + 538 + while (*c) { 539 + if (*c == '-') 540 + *c = '_'; 541 + c++; 542 + } 535 543 536 544 INIT_LIST_HEAD(&provider->clocks); 537 545