diff options
author | Tero Kristo <t-kristo@ti.com> | 2018-08-30 09:58:31 +0300 |
---|---|---|
committer | Tero Kristo <t-kristo@ti.com> | 2018-10-03 15:02:26 +0300 |
commit | 1dc88f78da594042b549f1ea70de2fb721990e3c (patch) | |
tree | fcf86c2df05adfd6753b29c7fa13311c15a1783f /drivers/clk/ti | |
parent | 47b00dcf141172c4c1c583701ec91923672cec39 (diff) | |
download | linux-1dc88f78da594042b549f1ea70de2fb721990e3c.tar.bz2 |
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>
Diffstat (limited to 'drivers/clk/ti')
-rw-r--r-- | drivers/clk/ti/clkctrl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c index 9bff57f0345d..e4b431b63e6b 100644 --- a/drivers/clk/ti/clkctrl.c +++ b/drivers/clk/ti/clkctrl.c @@ -445,6 +445,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) const __be32 *addrp; u32 addr; int ret; + char *c; if (!(ti_clk_get_features()->flags & TI_CLK_CLKCTRL_COMPAT) && !strcmp(node->name, "clk")) @@ -532,6 +533,15 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) strcat(provider->clkdm_name, "clkdm"); + /* Replace any dash from the clkdm name with underscore */ + c = provider->clkdm_name; + + while (*c) { + if (*c == '-') + *c = '_'; + c++; + } + INIT_LIST_HEAD(&provider->clocks); /* Generate clocks */ |