Skip to content

Commit 989eafd

Browse files
ribaldabebarino
authored andcommitted
clk: core: Avoid double initialization of clocks
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 <ricardo.ribalda@gmail.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
1 parent 915128b commit 989eafd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/clk/clk.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3459,6 +3459,10 @@ void __init of_clk_init(const struct of_device_id *matches)
34593459
&clk_provider_list, node) {
34603460
if (force || parent_ready(clk_provider->np)) {
34613461

3462+
/* Don't populate platform devices */
3463+
of_node_set_flag(clk_provider->np,
3464+
OF_POPULATED);
3465+
34623466
clk_provider->clk_init_cb(clk_provider->np);
34633467
of_clk_set_defaults(clk_provider->np, true);
34643468

0 commit comments

Comments
 (0)