diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2018-01-02 16:50:27 -0800 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2018-01-04 15:13:24 -0800 |
commit | 9919d44ff2977d4da709282fa0ebedddaa3b8d85 (patch) | |
tree | d6f6bce4621942794d1c7fdbc368f8e6cd3ba5ca /drivers/clk/sunxi/clk-sun8i-mbus.c | |
parent | e0af0c161000fa5914198d4cd1183bced68378f5 (diff) | |
download | lwn-9919d44ff2977d4da709282fa0ebedddaa3b8d85.tar.gz lwn-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.c | 7 |
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; |