From patchwork Tue Aug 18 16:55:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 7032321 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4B5BDC05AC for ; Tue, 18 Aug 2015 16:56:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3109F20729 for ; Tue, 18 Aug 2015 16:56:40 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id F2241206D7 for ; Tue, 18 Aug 2015 16:56:38 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 31E32261AB0; Tue, 18 Aug 2015 18:56:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 062DD261B07; Tue, 18 Aug 2015 18:56:12 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 31AE9261B01; Tue, 18 Aug 2015 18:56:11 +0200 (CEST) Received: from p2012.superclick.com (unknown [216.4.250.2]) by alsa0.perex.cz (Postfix) with ESMTP id 606142619D7 for ; Tue, 18 Aug 2015 18:55:48 +0200 (CEST) Received: from finisterre ([172.20.50.73]) by p2012.superclick.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id t7IGtima018824; Tue, 18 Aug 2015 09:55:45 -0700 Received: from broonie by finisterre with local (Exim 4.86) (envelope-from ) id 1ZRkAq-0004HC-4z; Tue, 18 Aug 2015 09:55:44 -0700 From: Mark Brown To: Vaishali Thakkar , Mark Brown In-Reply-To: <20150818115645.GA3345@localhost> Message-Id: Date: Tue, 18 Aug 2015 09:55:44 -0700 Cc: alsa-devel@alsa-project.org Subject: [alsa-devel] Applied "ASoC: tegra: Revert part of "ASoC: tegra: Convert to managed resources"" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The patch ASoC: tegra: Revert part of "ASoC: tegra: Convert to managed resources" has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 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 From 1d15f21dc8030c4511964819b89b50e39d5a7013 Mon Sep 17 00:00:00 2001 From: Vaishali Thakkar Date: Tue, 18 Aug 2015 17:26:45 +0530 Subject: [PATCH] ASoC: tegra: Revert part of "ASoC: tegra: Convert to managed resources" 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 Signed-off-by: Mark Brown --- 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; }