aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/sunxi/clk-sun8i-mbus.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2018-01-02 16:50:27 -0800
committerStephen Boyd <sboyd@codeaurora.org>2018-01-04 15:13:24 -0800
commit9919d44ff2977d4da709282fa0ebedddaa3b8d85 (patch)
treed6f6bce4621942794d1c7fdbc368f8e6cd3ba5ca /drivers/clk/sunxi/clk-sun8i-mbus.c
parentarch: Remove clkdev.h asm-generic from Kbuild (diff)
downloadlinux-dev-9919d44ff2977d4da709282fa0ebedddaa3b8d85.tar.xz
linux-dev-9919d44ff2977d4da709282fa0ebedddaa3b8d85.zip
clk: sunxi: Use CLK_IS_CRITICAL flag for critical clks
We'd like to privatize __clk_get(), but the sunxi clk driver is calling this function to keep a reference held on the clk and call clk_prepare_enable() on it. We support this design in the clk core now with the CLK_IS_CRITICAL flag, so let's just use that instead. Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/sunxi/clk-sun8i-mbus.c')
-rw-r--r--drivers/clk/sunxi/clk-sun8i-mbus.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/clk/sunxi/clk-sun8i-mbus.c b/drivers/clk/sunxi/clk-sun8i-mbus.c
index b200ebf159ee..56db89b6979f 100644
--- a/drivers/clk/sunxi/clk-sun8i-mbus.c
+++ b/drivers/clk/sunxi/clk-sun8i-mbus.c
@@ -15,7 +15,6 @@
*/
#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
@@ -82,11 +81,12 @@ static void __init sun8i_a23_mbus_setup(struct device_node *node)
mux->mask = SUN8I_MBUS_MUX_MASK;
mux->lock = &sun8i_a23_mbus_lock;
+ /* The MBUS clocks needs to be always enabled */
clk = clk_register_composite(NULL, clk_name, parents, num_parents,
&mux->hw, &clk_mux_ops,
&div->hw, &clk_divider_ops,
&gate->hw, &clk_gate_ops,
- 0);
+ CLK_IS_CRITICAL);
if (IS_ERR(clk))
goto err_free_gate;
@@ -95,9 +95,6 @@ static void __init sun8i_a23_mbus_setup(struct device_node *node)
goto err_unregister_clk;
kfree(parents); /* parents is deep copied */
- /* The MBUS clocks needs to be always enabled */
- __clk_get(clk);
- clk_prepare_enable(clk);
return;