diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2014-06-18 17:46:52 +0200 |
---|---|---|
committer | Tomasz Figa <t.figa@samsung.com> | 2014-06-30 15:07:55 +0200 |
commit | d5e136a21b2028fb1f45143ea7112d5869bfc6c7 (patch) | |
tree | 5515a38250e241056cf3538bbbf6deec37812765 /drivers/clk/samsung/clk-exynos3250.c | |
parent | bdfcdf18c380a3c376b42709a89eb2cc52e95ae0 (diff) |
clk: samsung: Register clk provider only after registering its all clocks
Ensure the clock provider is not registered until after all its related
clocks were created and are ready to use. Currently there are races
possible and any (of_)clk_get() call right after a clock provider's
clk_init_cb callback call may fail.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Diffstat (limited to 'drivers/clk/samsung/clk-exynos3250.c')
-rw-r--r-- | drivers/clk/samsung/clk-exynos3250.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/samsung/clk-exynos3250.c b/drivers/clk/samsung/clk-exynos3250.c index 7a17bd40d1dd..9a43cc3e7401 100644 --- a/drivers/clk/samsung/clk-exynos3250.c +++ b/drivers/clk/samsung/clk-exynos3250.c @@ -776,5 +776,7 @@ static void __init exynos3250_cmu_init(struct device_node *np) samsung_clk_register_gate(ctx, gate_clks, ARRAY_SIZE(gate_clks)); exynos3250_clk_sleep_init(); + + samsung_clk_of_add_provider(np, ctx); } CLK_OF_DECLARE(exynos3250_cmu, "samsung,exynos3250-cmu", exynos3250_cmu_init); |