Commit cbf9591f authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Stephen Boyd

clk: add clk_unregister_fixed_factor()

Allow to unregister fixed factor clock.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 5540ac8d
...@@ -100,6 +100,19 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name, ...@@ -100,6 +100,19 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
} }
EXPORT_SYMBOL_GPL(clk_register_fixed_factor); 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 #ifdef CONFIG_OF
/** /**
* of_fixed_factor_clk_setup() - Setup function for simple fixed factor clock * of_fixed_factor_clk_setup() - Setup function for simple fixed factor clock
......
...@@ -498,6 +498,7 @@ extern const struct clk_ops clk_fixed_factor_ops; ...@@ -498,6 +498,7 @@ extern const struct clk_ops clk_fixed_factor_ops;
struct clk *clk_register_fixed_factor(struct device *dev, const char *name, struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
const char *parent_name, unsigned long flags, const char *parent_name, unsigned long flags,
unsigned int mult, unsigned int div); unsigned int mult, unsigned int div);
void clk_unregister_fixed_factor(struct clk *clk);
/** /**
* struct clk_fractional_divider - adjustable fractional divider clock * struct clk_fractional_divider - adjustable fractional divider clock
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment