aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@kernel.org>2019-07-31 12:35:17 -0700
committerStephen Boyd <sboyd@kernel.org>2019-08-16 10:27:29 -0700
commit0214f33c4e0e1f5a9a9c3f4881310c61713294e6 (patch)
tree8ad6b26dc120c4beeaf31eb3a6fe123378636963 /include/linux/clk-provider.h
parentclk: sunxi: Don't call clk_hw_get_name() on a hw that isn't registered (diff)
downloadlinux-dev-0214f33c4e0e1f5a9a9c3f4881310c61713294e6.tar.xz
linux-dev-0214f33c4e0e1f5a9a9c3f4881310c61713294e6.zip
clk: Overwrite clk_hw::init with NULL during clk_register()
We don't want clk provider drivers to use the init structure after clk registration time, but we leave a dangling reference to it by means of clk_hw::init. Let's overwrite the member with NULL during clk_register() so that this can't be used anymore after registration time. Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Doug Anderson <dianders@chromium.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org> Link: https://lkml.kernel.org/r/20190731193517.237136-10-sboyd@kernel.org Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r--include/linux/clk-provider.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 2ae7604783dd..214c75ed62ae 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -299,7 +299,8 @@ struct clk_init_data {
* into the clk API
*
* @init: pointer to struct clk_init_data that contains the init data shared
- * with the common clock framework.
+ * with the common clock framework. This pointer will be set to NULL once
+ * a clk_register() variant is called on this clk_hw pointer.
*/
struct clk_hw {
struct clk_core *core;