clk: move the common clock's to_clk_*(_hw) macros to clk-provider.h
[cascardo/linux.git] / drivers / clk / st / clkgen-mux.c
index 5dc5ce2..0d9a74b 100644 (file)
@@ -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);