* [PATCH] ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable
@ 2023-12-25 8:06 Chancel Liu
2023-12-27 10:13 ` Shengjiu Wang
2023-12-29 16:58 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Chancel Liu @ 2023-12-25 8:06 UTC (permalink / raw)
To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
broonie, perex, tiwai, alsa-devel, linux-kernel, linuxppc-dev,
linux-sound
Cc: Chancel Liu
There is error message when defer probe happens:
fsl_rpmsg rpmsg_audio: Unbalanced pm_runtime_enable!
Fix the error handler with pm_runtime_enable.
Fixes: b73d9e6225e8 ("ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg")
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
sound/soc/fsl/fsl_rpmsg.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/sound/soc/fsl/fsl_rpmsg.c b/sound/soc/fsl/fsl_rpmsg.c
index 5c5c04ce9db7..00852f174a69 100644
--- a/sound/soc/fsl/fsl_rpmsg.c
+++ b/sound/soc/fsl/fsl_rpmsg.c
@@ -238,7 +238,7 @@ static int fsl_rpmsg_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component,
&fsl_rpmsg_dai, 1);
if (ret)
- return ret;
+ goto err_pm_disable;
rpmsg->card_pdev = platform_device_register_data(&pdev->dev,
"imx-audio-rpmsg",
@@ -248,16 +248,22 @@ static int fsl_rpmsg_probe(struct platform_device *pdev)
if (IS_ERR(rpmsg->card_pdev)) {
dev_err(&pdev->dev, "failed to register rpmsg card\n");
ret = PTR_ERR(rpmsg->card_pdev);
- return ret;
+ goto err_pm_disable;
}
return 0;
+
+err_pm_disable:
+ pm_runtime_disable(&pdev->dev);
+ return ret;
}
static void fsl_rpmsg_remove(struct platform_device *pdev)
{
struct fsl_rpmsg *rpmsg = platform_get_drvdata(pdev);
+ pm_runtime_disable(&pdev->dev);
+
if (rpmsg->card_pdev)
platform_device_unregister(rpmsg->card_pdev);
}
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable
2023-12-25 8:06 [PATCH] ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable Chancel Liu
@ 2023-12-27 10:13 ` Shengjiu Wang
2023-12-29 16:58 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Shengjiu Wang @ 2023-12-27 10:13 UTC (permalink / raw)
To: Chancel Liu
Cc: alsa-devel, linuxppc-dev, Xiubo.Lee, linux-kernel, tiwai,
lgirdwood, linux-sound, perex, nicoleotsuka, broonie, festevam
On Mon, Dec 25, 2023 at 4:06 PM Chancel Liu <chancel.liu@nxp.com> wrote:
>
> There is error message when defer probe happens:
>
> fsl_rpmsg rpmsg_audio: Unbalanced pm_runtime_enable!
>
> Fix the error handler with pm_runtime_enable.
>
> Fixes: b73d9e6225e8 ("ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg")
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Best regards
wang shengjiu
> ---
> sound/soc/fsl/fsl_rpmsg.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_rpmsg.c b/sound/soc/fsl/fsl_rpmsg.c
> index 5c5c04ce9db7..00852f174a69 100644
> --- a/sound/soc/fsl/fsl_rpmsg.c
> +++ b/sound/soc/fsl/fsl_rpmsg.c
> @@ -238,7 +238,7 @@ static int fsl_rpmsg_probe(struct platform_device *pdev)
> ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component,
> &fsl_rpmsg_dai, 1);
> if (ret)
> - return ret;
> + goto err_pm_disable;
>
> rpmsg->card_pdev = platform_device_register_data(&pdev->dev,
> "imx-audio-rpmsg",
> @@ -248,16 +248,22 @@ static int fsl_rpmsg_probe(struct platform_device *pdev)
> if (IS_ERR(rpmsg->card_pdev)) {
> dev_err(&pdev->dev, "failed to register rpmsg card\n");
> ret = PTR_ERR(rpmsg->card_pdev);
> - return ret;
> + goto err_pm_disable;
> }
>
> return 0;
> +
> +err_pm_disable:
> + pm_runtime_disable(&pdev->dev);
> + return ret;
> }
>
> static void fsl_rpmsg_remove(struct platform_device *pdev)
> {
> struct fsl_rpmsg *rpmsg = platform_get_drvdata(pdev);
>
> + pm_runtime_disable(&pdev->dev);
> +
> if (rpmsg->card_pdev)
> platform_device_unregister(rpmsg->card_pdev);
> }
> --
> 2.42.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable
2023-12-25 8:06 [PATCH] ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable Chancel Liu
2023-12-27 10:13 ` Shengjiu Wang
@ 2023-12-29 16:58 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-12-29 16:58 UTC (permalink / raw)
To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
perex, tiwai, alsa-devel, linux-kernel, linuxppc-dev, linux-sound,
Chancel Liu
On Mon, 25 Dec 2023 17:06:08 +0900, Chancel Liu wrote:
> There is error message when defer probe happens:
>
> fsl_rpmsg rpmsg_audio: Unbalanced pm_runtime_enable!
>
> Fix the error handler with pm_runtime_enable.
>
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable
commit: f9d378fc68c43fd41b35133edec9cd902ec334ec
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-29 16:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-25 8:06 [PATCH] ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable Chancel Liu
2023-12-27 10:13 ` Shengjiu Wang
2023-12-29 16:58 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).