summaryrefslogtreecommitdiffstats
path: root/drivers/clk/samsung/clk-exynos5250.c
diff options
context:
space:
mode:
authorSylwester Nawrocki2014-06-18 17:46:52 +0200
committerTomasz Figa2014-06-30 15:07:55 +0200
commitd5e136a21b2028fb1f45143ea7112d5869bfc6c7 (patch)
tree5515a38250e241056cf3538bbbf6deec37812765 /drivers/clk/samsung/clk-exynos5250.c
parentMerge branch 'v3.16-samsung-clk-fixes-1' into samsung-clk-next (diff)
downloadkernel-qcow2-linux-d5e136a21b2028fb1f45143ea7112d5869bfc6c7.tar.gz
kernel-qcow2-linux-d5e136a21b2028fb1f45143ea7112d5869bfc6c7.tar.xz
kernel-qcow2-linux-d5e136a21b2028fb1f45143ea7112d5869bfc6c7.zip
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-exynos5250.c')
-rw-r--r--drivers/clk/samsung/clk-exynos5250.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c
index 184f64293b26..5861183d1226 100644
--- a/drivers/clk/samsung/clk-exynos5250.c
+++ b/drivers/clk/samsung/clk-exynos5250.c
@@ -820,6 +820,8 @@ static void __init exynos5250_clk_init(struct device_node *np)
exynos5250_clk_sleep_init();
+ samsung_clk_of_add_provider(np, ctx);
+
pr_info("Exynos5250: clock setup completed, armclk=%ld\n",
_get_rate("div_arm2"));
}