diff options
author | Geliang Tang <geliangtang@163.com> | 2016-01-08 16:51:46 +0100 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-01-29 21:59:50 +0100 |
commit | 5fd9c05c846db98319e75496612da24435cee208 (patch) | |
tree | eea4db5c7285b5bfe3173b085c3880bdb4277100 /drivers/clk/st | |
parent | clk: xgene: Remove return from void function (diff) | |
download | linux-5fd9c05c846db98319e75496612da24435cee208.tar.xz linux-5fd9c05c846db98319e75496612da24435cee208.zip |
clk: move the common clock's to_clk_*(_hw) macros to clk-provider.h
to_clk_*(_hw) macros have been repeatedly defined in many places.
This patch moves all the to_clk_*(_hw) definitions in the common
clock framework to public header clk-provider.h, and drop the local
definitions.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/st')
-rw-r--r-- | drivers/clk/st/clkgen-mux.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/clk/st/clkgen-mux.c b/drivers/clk/st/clkgen-mux.c index 5dc5ce217960..0d9a74b66ea3 100644 --- a/drivers/clk/st/clkgen-mux.c +++ b/drivers/clk/st/clkgen-mux.c @@ -822,11 +822,10 @@ err: if (!clk_data->clks[i]) continue; - composite = container_of(__clk_get_hw(clk_data->clks[i]), - struct clk_composite, hw); - kfree(container_of(composite->gate_hw, struct clk_gate, hw)); - kfree(container_of(composite->rate_hw, struct clk_divider, hw)); - kfree(container_of(composite->mux_hw, struct clk_mux, hw)); + composite = to_clk_composite(__clk_get_hw(clk_data->clks[i])); + kfree(to_clk_gate(composite->gate_hw)); + kfree(to_clk_divider(composite->rate_hw)); + kfree(to_clk_mux(composite->mux_hw)); } kfree(clk_data->clks); |