diff options
author | Leonard Crestez <leonard.crestez@nxp.com> | 2017-02-20 15:20:56 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2017-03-07 05:19:20 -0800 |
commit | 253160a8ad06bcc1c1db16a58b1f06d5128f6c5e (patch) | |
tree | e069d6c9cf9e16cd4ff831912764f8d08a0422d0 /drivers | |
parent | cda82ace3d4eff6a38f00a65db435fe35a3916f0 (diff) | |
download | op-kernel-dev-253160a8ad06bcc1c1db16a58b1f06d5128f6c5e.zip op-kernel-dev-253160a8ad06bcc1c1db16a58b1f06d5128f6c5e.tar.gz |
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')
-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 0fb39fe..67201f6 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); } |