Skip to content

Commit

Permalink
ASoC: tegra20: i2s: Correct driver removal order
Browse files Browse the repository at this point in the history
Tegra20 I2S 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-10-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Dmitry Osipenko authored and Mark Brown committed Mar 18, 2021
1 parent e33fdd9 commit ca6e960
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/tegra/tegra20_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,13 +440,13 @@ static int tegra20_i2s_platform_remove(struct platform_device *pdev)
{
struct tegra20_i2s *i2s = dev_get_drvdata(&pdev->dev);

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_i2s_runtime_suspend(&pdev->dev);

tegra_pcm_platform_unregister(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);

clk_put(i2s->clk_i2s);

return 0;
Expand Down

0 comments on commit ca6e960

Please sign in to comment.