aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/clk/clk-fsl-sai.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/clk-fsl-sai.c')
-rw-r--r--drivers/clk/clk-fsl-sai.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/clk/clk-fsl-sai.c b/drivers/clk/clk-fsl-sai.c
index 0221180a4dd7..1e81c8d8a6fd 100644
--- a/drivers/clk/clk-fsl-sai.c
+++ b/drivers/clk/clk-fsl-sai.c
@@ -68,9 +68,20 @@ static int fsl_sai_clk_probe(struct platform_device *pdev)
if (IS_ERR(hw))
return PTR_ERR(hw);
+ platform_set_drvdata(pdev, hw);
+
return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, hw);
}
+static int fsl_sai_clk_remove(struct platform_device *pdev)
+{
+ struct clk_hw *hw = platform_get_drvdata(pdev);
+
+ clk_hw_unregister_composite(hw);
+
+ return 0;
+}
+
static const struct of_device_id of_fsl_sai_clk_ids[] = {
{ .compatible = "fsl,vf610-sai-clock" },
{ }
@@ -79,6 +90,7 @@ MODULE_DEVICE_TABLE(of, of_fsl_sai_clk_ids);
static struct platform_driver fsl_sai_clk_driver = {
.probe = fsl_sai_clk_probe,
+ .remove = fsl_sai_clk_remove,
.driver = {
.name = "fsl-sai-clk",
.of_match_table = of_fsl_sai_clk_ids,