Merge branch 'for-5.16' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[platform/kernel/linux-starfive.git] / sound / soc / stm / stm32_i2s.c
index 717f45a..24327ca 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/module.h>
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
+#include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 #include <linux/reset.h>
 #include <linux/spinlock.h>
@@ -1113,6 +1114,7 @@ static int stm32_i2s_remove(struct platform_device *pdev)
 {
        snd_dmaengine_pcm_unregister(&pdev->dev);
        snd_soc_unregister_component(&pdev->dev);
+       pm_runtime_disable(&pdev->dev);
 
        return 0;
 }
@@ -1150,6 +1152,8 @@ static int stm32_i2s_probe(struct platform_device *pdev)
                return PTR_ERR(i2s->regmap);
        }
 
+       pm_runtime_enable(&pdev->dev);
+
        ret = snd_dmaengine_pcm_register(&pdev->dev, &stm32_i2s_pcm_config, 0);
        if (ret) {
                if (ret != -EPROBE_DEFER)