summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-fixed-rate.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-01-06 13:25:10 +0900
committerStephen Boyd <sboyd@codeaurora.org>2016-01-29 16:37:24 -0800
commit0b225e41e369a7e03411bb67988513302a10382f (patch)
tree0e13cfed86eed6cdb332fa198363c58934361000 /drivers/clk/clk-fixed-rate.c
parentcbf9591f665d44f40795afe2eee4fcbcd32575d6 (diff)
downloadop-kernel-dev-0b225e41e369a7e03411bb67988513302a10382f.zip
op-kernel-dev-0b225e41e369a7e03411bb67988513302a10382f.tar.gz
clk: add clk_unregister_fixed_rate()
Allow to unregister fixed rate 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-rate.c')
-rw-r--r--drivers/clk/clk-fixed-rate.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
index e156beb..6858bfc 100644
--- a/drivers/clk/clk-fixed-rate.c
+++ b/drivers/clk/clk-fixed-rate.c
@@ -104,6 +104,19 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
}
EXPORT_SYMBOL_GPL(clk_register_fixed_rate);
+void clk_unregister_fixed_rate(struct clk *clk)
+{
+ struct clk_hw *hw;
+
+ hw = __clk_get_hw(clk);
+ if (!hw)
+ return;
+
+ clk_unregister(clk);
+ kfree(to_clk_fixed_rate(hw));
+}
+EXPORT_SYMBOL_GPL(clk_unregister_fixed_rate);
+
#ifdef CONFIG_OF
/**
* of_fixed_clk_setup() - Setup function for simple fixed rate clock
OpenPOWER on IntegriCloud