diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-01-06 07:25:09 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-01-30 03:35:49 +0300 |
commit | cbf9591f665d44f40795afe2eee4fcbcd32575d6 (patch) | |
tree | b976617c56ab74f29ceb0d83001e8d04e03c6c31 /drivers/clk/clk-fixed-factor.c | |
parent | 5540ac8da18789e567f6d16582f76de7ab196eab (diff) | |
download | linux-cbf9591f665d44f40795afe2eee4fcbcd32575d6.tar.xz |
clk: add clk_unregister_fixed_factor()
Allow to unregister fixed factor clock.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clk-fixed-factor.c')
-rw-r--r-- | drivers/clk/clk-fixed-factor.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index f0ddf37d5e15..053448e2453d 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -100,6 +100,19 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name, } EXPORT_SYMBOL_GPL(clk_register_fixed_factor); +void clk_unregister_fixed_factor(struct clk *clk) +{ + struct clk_hw *hw; + + hw = __clk_get_hw(clk); + if (!hw) + return; + + clk_unregister(clk); + kfree(to_clk_fixed_factor(hw)); +} +EXPORT_SYMBOL_GPL(clk_unregister_fixed_factor); + #ifdef CONFIG_OF /** * of_fixed_factor_clk_setup() - Setup function for simple fixed factor clock |