mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
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>
This commit is contained in:
parent
a7b85ad25a
commit
0214f33c4e
2 changed files with 18 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue