Skip to content

Commit

Permalink
clk: core: Avoid double initialization of clocks
Browse files Browse the repository at this point in the history
Some clock providers can be initialized via of_clk_init() and also via
platform device probe.

Avoid double initialization of them by setting the OF_POPULATED flag.

Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
  • Loading branch information
ribalda authored and bebarino committed Aug 13, 2016
1 parent 915128b commit 989eafd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3459,6 +3459,10 @@ void __init of_clk_init(const struct of_device_id *matches)
&clk_provider_list, node) {
if (force || parent_ready(clk_provider->np)) {

/* Don't populate platform devices */
of_node_set_flag(clk_provider->np,
OF_POPULATED);

clk_provider->clk_init_cb(clk_provider->np);
of_clk_set_defaults(clk_provider->np, true);

Expand Down

0 comments on commit 989eafd

Please sign in to comment.