Re: [PATCH 01/11] ASoC: tegra: asrc: Use devm_pm_runtime_enable()
From: Thierry Reding
Date: Fri Dec 04 2026 - 07:28:30 EST
On Fri, Dec 04, 2026 at 06:22:10PM +0700, phucduc.bui@xxxxxxxxx wrote:
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> Replace pm_runtime_enable() with devm_pm_runtime_enable()
> and remove the redundant remove callback.
>
> Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
> ---
> sound/soc/tegra/tegra186_asrc.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/sound/soc/tegra/tegra186_asrc.c b/sound/soc/tegra/tegra186_asrc.c
> index 07ad7b3b8604..a86db35cf920 100644
> --- a/sound/soc/tegra/tegra186_asrc.c
> +++ b/sound/soc/tegra/tegra186_asrc.c
> @@ -1182,6 +1182,10 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev)
>
> mutex_init(&asrc->ratio_lock);
>
> + err = devm_pm_runtime_enable(dev);
> + if (err)
> + return err;
> +
> err = devm_snd_soc_register_component(dev, &tegra186_asrc_cmpnt,
> tegra186_asrc_dais,
> ARRAY_SIZE(tegra186_asrc_dais));
> @@ -1189,16 +1193,9 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev)
> return dev_err_probe(dev, err,
> "can't register ASRC component\n");
>
> - pm_runtime_enable(dev);
> -
> return 0;
> }
Is there a specific reason why devm_pm_runtime_enable() was moved before
the devm_snd_soc_register_component(). It doesn't sound like it makes
much of a difference, and it may actually be better this way because it
avoids registering the component and having to unregister it if
devm_pm_runtime_enable() failed, but it'd be better to document that
change.
Other than that, this series honestly could've been a single patch. None
of the above are really worth a new revision, though.
Thierry
Attachment:
signature.asc
Description: PGP signature