]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
clk: at91: sckc: add support to free slow oscillator
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Thu, 27 Jun 2019 15:53:39 +0000 (18:53 +0300)
committerStephen Boyd <sboyd@kernel.org>
Thu, 27 Jun 2019 18:18:16 +0000 (11:18 -0700)
Add support to free slow oscillator resources.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/at91/sckc.c

index 1f0f1cd06387596dd7447647df19d28c08c76cbb..3f84d58d06a54412e872b36f594d78229580ee22 100644 (file)
@@ -161,6 +161,14 @@ at91_clk_register_slow_osc(void __iomem *sckcr,
        return hw;
 }
 
+static void at91_clk_unregister_slow_osc(struct clk_hw *hw)
+{
+       struct clk_slow_osc *osc = to_clk_slow_osc(hw);
+
+       clk_hw_unregister(hw);
+       kfree(osc);
+}
+
 static unsigned long clk_slow_rc_osc_recalc_rate(struct clk_hw *hw,
                                                 unsigned long parent_rate)
 {