From bc3d0e5a9bb512b0c602aa87b0f99103b04486ee Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: May 24 2023 15:05:31 +0000 Subject: ASoC: fsl_micfil: Fix error handler with pm_runtime_enable (git-fixes). --- diff --git a/patches.suse/ASoC-fsl_micfil-Fix-error-handler-with-pm_runtime_en.patch b/patches.suse/ASoC-fsl_micfil-Fix-error-handler-with-pm_runtime_en.patch new file mode 100644 index 0000000..7355142 --- /dev/null +++ b/patches.suse/ASoC-fsl_micfil-Fix-error-handler-with-pm_runtime_en.patch @@ -0,0 +1,66 @@ +From 17955aba7877a4494d8093ae5498e19469b01d57 Mon Sep 17 00:00:00 2001 +From: Shengjiu Wang +Date: Mon, 8 May 2023 18:16:36 +0800 +Subject: [PATCH] ASoC: fsl_micfil: Fix error handler with pm_runtime_enable +Git-commit: 17955aba7877a4494d8093ae5498e19469b01d57 +Patch-mainline: v6.4-rc3 +References: git-fixes + +There is error message when defer probe happens: + +fsl-micfil-dai 30ca0000.micfil: Unbalanced pm_runtime_enable! + +Fix the error handler with pm_runtime_enable and add +fsl_micfil_remove() for pm_runtime_disable. + +Fixes: 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.") +Signed-off-by: Shengjiu Wang + +--- + sound/soc/fsl/fsl_micfil.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +--- a/sound/soc/fsl/fsl_micfil.c ++++ b/sound/soc/fsl/fsl_micfil.c +@@ -763,7 +763,7 @@ static int fsl_micfil_probe(struct platf + ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); + if (ret) { + dev_err(&pdev->dev, "failed to pcm register\n"); +- return ret; ++ goto err_pm_disable; + } + + ret = devm_snd_soc_register_component(&pdev->dev, &fsl_micfil_component, +@@ -771,9 +771,21 @@ static int fsl_micfil_probe(struct platf + if (ret) { + dev_err(&pdev->dev, "failed to register component %s\n", + fsl_micfil_component.name); ++ goto err_pm_disable; + } + + return ret; ++ ++err_pm_disable: ++ pm_runtime_disable(&pdev->dev); ++ ++ return ret; ++} ++ ++static int fsl_micfil_remove(struct platform_device *pdev) ++{ ++ pm_runtime_disable(&pdev->dev); ++ return 0; + } + + static int __maybe_unused fsl_micfil_runtime_suspend(struct device *dev) +@@ -834,6 +846,7 @@ static const struct dev_pm_ops fsl_micfi + + static struct platform_driver fsl_micfil_driver = { + .probe = fsl_micfil_probe, ++ .remove = fsl_micfil_remove, + .driver = { + .name = "fsl-micfil-dai", + .pm = &fsl_micfil_pm_ops, diff --git a/series.conf b/series.conf index 92139de..c703c20 100644 --- a/series.conf +++ b/series.conf @@ -20078,6 +20078,7 @@ patches.suse/ALSA-usb-audio-Add-a-sample-rate-workaround-for-Line.patch patches.suse/ALSA-hda-realtek-Apply-HP-B-O-top-speaker-profile-to.patch patches.suse/ALSA-hda-realtek-Fix-mute-and-micmute-LEDs-for-yet-a.patch + patches.suse/ASoC-fsl_micfil-Fix-error-handler-with-pm_runtime_en.patch patches.suse/ALSA-hda-Fix-Oops-by-9.1-surround-channel-names.patch patches.suse/ALSA-cs46xx-mark-snd_cs46xx_download_image-as-static.patch patches.suse/ALSA-hda-Add-NVIDIA-codec-IDs-a3-through-a7-to-patch.patch