Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1209221 > unrolled thread

[PATCH] Revert part of "ASoC: tegra: Convert to managed resources"

Started byVaishali Thakkar <vthakkar1994@gmail.com>
First post2015-08-18 14:00 +0200
Last post2015-08-18 19:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Revert part of "ASoC: tegra: Convert to managed resources" Vaishali Thakkar <vthakkar1994@gmail.com> - 2015-08-18 14:00 +0200
    Re: [PATCH] Revert part of "ASoC: tegra: Convert to managed  resources" Mark Brown <broonie@kernel.org> - 2015-08-18 19:00 +0200

#1209221 — [PATCH] Revert part of "ASoC: tegra: Convert to managed resources"

FromVaishali Thakkar <vthakkar1994@gmail.com>
Date2015-08-18 14:00 +0200
Subject[PATCH] Revert part of "ASoC: tegra: Convert to managed resources"
Message-ID<pYNIC-5h0-19@gated-at.bofh.it>
Revert the problematic part of commit 470805eb9f31 ("ASoC: tegra:
Convert to managed resources"). Before this commit, PM cleanup was
performed after the component was unregistered. But returning
directly will skip PM cleanup. So, to be on safe side it is better
to use snd_soc_register_component instead of
devm_snd_soc_register_component.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
---
 sound/soc/tegra/tegra20_spdif.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c
index a814da0..66237bc 100644
--- a/sound/soc/tegra/tegra20_spdif.c
+++ b/sound/soc/tegra/tegra20_spdif.c
@@ -329,9 +329,8 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
 			goto err_pm_disable;
 	}
 
-	ret = devm_snd_soc_register_component(&pdev->dev,
-					      &tegra20_spdif_component,
-					      &tegra20_spdif_dai, 1);
+	ret = snd_soc_register_component(&pdev->dev, &tegra20_spdif_component,
+					 &tegra20_spdif_dai, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
 		ret = -ENOMEM;
@@ -341,11 +340,13 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
 	ret = tegra_pcm_platform_register(&pdev->dev);
 	if (ret) {
 		dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
-		return ret;
+		goto err_unregister_component;
 	}
 
 	return 0;
 
+err_unregister_component:
+	snd_soc_unregister_component(&pdev->dev);
 err_suspend:
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		tegra20_spdif_runtime_suspend(&pdev->dev);
@@ -364,6 +365,7 @@ static int tegra20_spdif_platform_remove(struct platform_device *pdev)
 		tegra20_spdif_runtime_suspend(&pdev->dev);
 
 	tegra_pcm_platform_unregister(&pdev->dev);
+	snd_soc_unregister_component(&pdev->dev);
 
 	return 0;
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1209365 — Re: [PATCH] Revert part of "ASoC: tegra: Convert to managed resources"

FromMark Brown <broonie@kernel.org>
Date2015-08-18 19:00 +0200
SubjectRe: [PATCH] Revert part of "ASoC: tegra: Convert to managed resources"
Message-ID<pYSoV-3I8-1@gated-at.bofh.it>
In reply to#1209221

[Multipart message — attachments visible in raw view] — view raw

On Tue, Aug 18, 2015 at 05:26:45PM +0530, Vaishali Thakkar wrote:

> Revert the problematic part of commit 470805eb9f31 ("ASoC: tegra:
> Convert to managed resources"). Before this commit, PM cleanup was

Please use subject lines matching the style for the subsystem on
patches.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web