clk: core: Avoid double initialization of clocks
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Tue, 5 Jul 2016 16:23:32 +0000 (18:23 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Sat, 13 Aug 2016 01:01:58 +0000 (18:01 -0700)
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>
drivers/clk/clk.c

index 238b989bf77886460df665e5870e909647a2dbde..0c6009a1995798aaf4f0bb23cc2a08946f974baa 100644 (file)
@@ -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);
 
This page took 0.025026 seconds and 5 git commands to generate.