clk: fixed-rate: add clk_hw_unregister_fixed_rate()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 22 May 2016 05:33:35 +0000 (14:33 +0900)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 30 Jun 2016 20:07:10 +0000 (13:07 -0700)
This will be used to migrate to the clk_hw APIs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-fixed-rate.c
include/linux/clk-provider.h

index 8e4453e..2edb393 100644 (file)
@@ -145,6 +145,17 @@ void clk_unregister_fixed_rate(struct clk *clk)
 }
 EXPORT_SYMBOL_GPL(clk_unregister_fixed_rate);
 
+void clk_hw_unregister_fixed_rate(struct clk_hw *hw)
+{
+       struct clk_fixed_rate *fixed;
+
+       fixed = to_clk_fixed_rate(hw);
+
+       clk_hw_unregister(hw);
+       kfree(fixed);
+}
+EXPORT_SYMBOL_GPL(clk_hw_unregister_fixed_rate);
+
 #ifdef CONFIG_OF
 /**
  * of_fixed_clk_setup() - Setup function for simple fixed rate clock
index 0c72204..94e00fe 100644 (file)
@@ -293,6 +293,7 @@ void clk_unregister_fixed_rate(struct clk *clk);
 struct clk_hw *clk_hw_register_fixed_rate_with_accuracy(struct device *dev,
                const char *name, const char *parent_name, unsigned long flags,
                unsigned long fixed_rate, unsigned long fixed_accuracy);
+void clk_hw_unregister_fixed_rate(struct clk_hw *hw);
 
 void of_fixed_clk_setup(struct device_node *np);