diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2016-04-21 14:43:56 -0700 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-04-21 14:43:56 -0700 |
commit | e9471c4ecf8a50169216e7232e12b23761ce3d15 (patch) | |
tree | d18d1acd815887025a835674e5805a4fdc9dbb82 | |
parent | 624b5ea624f368e8755304bc63a5ee5d0a899dcb (diff) | |
parent | 92a39d9043ba5ff98adb1c31491f00c7bea5466e (diff) |
Merge branch 'clk-composite-unregister' into clk-next
* clk-composite-unregister:
clk: composite: Add unregister function
-rw-r--r-- | drivers/clk/clk-composite.c | 15 | ||||
-rw-r--r-- | include/linux/clk-provider.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c index 4d4b5aba397d..8aec4b3d5859 100644 --- a/drivers/clk/clk-composite.c +++ b/drivers/clk/clk-composite.c @@ -319,3 +319,18 @@ err: kfree(composite); return clk; } + +void clk_unregister_composite(struct clk *clk) +{ + struct clk_composite *composite; + struct clk_hw *hw; + + hw = __clk_get_hw(clk); + if (!hw) + return; + + composite = to_clk_composite(hw); + + clk_unregister(clk); + kfree(composite); +} diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 156286445a25..02a8f15b528a 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -604,6 +604,7 @@ struct clk *clk_register_composite(struct device *dev, const char *name, struct clk_hw *rate_hw, const struct clk_ops *rate_ops, struct clk_hw *gate_hw, const struct clk_ops *gate_ops, unsigned long flags); +void clk_unregister_composite(struct clk *clk); /*** * struct clk_gpio_gate - gpio gated clock |