diff options
author | Leonard Crestez <leonard.crestez@nxp.com> | 2017-02-20 14:20:56 +0100 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2017-03-07 14:19:20 +0100 |
commit | 253160a8ad06bcc1c1db16a58b1f06d5128f6c5e (patch) | |
tree | e069d6c9cf9e16cd4ff831912764f8d08a0422d0 /drivers/clk/clk.c | |
parent | dt-bindings: arm: update Armada CP110 system controller binding (diff) | |
download | linux-253160a8ad06bcc1c1db16a58b1f06d5128f6c5e.tar.xz linux-253160a8ad06bcc1c1db16a58b1f06d5128f6c5e.zip |
clk: core: Copy connection id
Some drivers use sprintf to build clk connection id names but the clk
core will save those strings and occasionally print them back. Duplicate
the con_id strings instead of fixing all the users.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r-- | drivers/clk/clk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 0fb39fe217d1..67201f67a14a 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2502,7 +2502,7 @@ struct clk *__clk_create_clk(struct clk_hw *hw, const char *dev_id, clk->core = hw->core; clk->dev_id = dev_id; - clk->con_id = con_id; + clk->con_id = kstrdup_const(con_id, GFP_KERNEL); clk->max_rate = ULONG_MAX; clk_prepare_lock(); @@ -2518,6 +2518,7 @@ void __clk_free_clk(struct clk *clk) hlist_del(&clk->clks_node); clk_prepare_unlock(); + kfree_const(clk->con_id); kfree(clk); } |