summaryrefslogtreecommitdiff
path: root/sound/soc/tegra
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2021-03-14 18:44:48 +0300
committerMark Brown <broonie@kernel.org>2021-03-18 13:49:35 +0000
commit0911f154a2ae264ee2a7c868c1267a102396d016 (patch)
tree55fa48738d726524c0dc6ee9456fc935220cb541 /sound/soc/tegra
parent050086eb6dc945207b1db1d15cd81e9366dfd2f1 (diff)
ASoC: tegra20: spdif: Correct driver removal order
Tegra20 SPDIF driver has a wrong driver removal order, which should be opposite to the registration order, but it's not. In particular the runtime PM is disabled in a wrong order. Fix the order. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210314154459.15375-7-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r--sound/soc/tegra/tegra20_spdif.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c
index 5839833e23a0..e48d332506a0 100644
--- a/sound/soc/tegra/tegra20_spdif.c
+++ b/sound/soc/tegra/tegra20_spdif.c
@@ -329,13 +329,13 @@ err_pm_disable:
static int tegra20_spdif_platform_remove(struct platform_device *pdev)
{
+ tegra_pcm_platform_unregister(&pdev->dev);
+ snd_soc_unregister_component(&pdev->dev);
+
pm_runtime_disable(&pdev->dev);
if (!pm_runtime_status_suspended(&pdev->dev))
tegra20_spdif_runtime_suspend(&pdev->dev);
- tegra_pcm_platform_unregister(&pdev->dev);
- snd_soc_unregister_component(&pdev->dev);
-
return 0;
}