]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
clk: at91: sckc: add support to free slow clock osclillator
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Thu, 27 Jun 2019 15:53:41 +0000 (18:53 +0300)
committerStephen Boyd <sboyd@kernel.org>
Thu, 27 Jun 2019 18:18:18 +0000 (11:18 -0700)
Add support to free slow clock 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 4b0fcfd29f8246897a72dcec41865633b59bfee8..68a818e69325c0e62b3aee2c4328e7a71db20660 100644 (file)
@@ -350,6 +350,14 @@ at91_clk_register_sam9x5_slow(void __iomem *sckcr,
        return hw;
 }
 
+static void at91_clk_unregister_sam9x5_slow(struct clk_hw *hw)
+{
+       struct clk_sam9x5_slow *slowck = to_clk_sam9x5_slow(hw);
+
+       clk_hw_unregister(hw);
+       kfree(slowck);
+}
+
 static void __init at91sam9x5_sckc_register(struct device_node *np,
                                            unsigned int rc_osc_startup_us,
                                            const struct clk_slow_bits *bits)