diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-10-13 10:37:10 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-10-19 20:15:16 +0100 |
commit | 2057020db384cb971cfd51296426f447e6d66b64 (patch) | |
tree | f039550b69ffb9e99a785bd12d4e83c6f87ec696 /sound/soc/rockchip/rockchip_spdif.c | |
parent | f874b80e1571118fcf4554878633556f06f998e6 (diff) | |
download | linux-stable-2057020db384cb971cfd51296426f447e6d66b64.tar.gz linux-stable-2057020db384cb971cfd51296426f447e6d66b64.tar.bz2 linux-stable-2057020db384cb971cfd51296426f447e6d66b64.zip |
ASoC: rockchip: spdif: Convert to use devm_snd_dmaengine_pcm_register
Use resource managed API then we can remove snd_dmaengine_pcm_unregister()
and snd_soc_unregister_component() calls in .probe error path and .remove.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/rockchip/rockchip_spdif.c')
-rw-r--r-- | sound/soc/rockchip/rockchip_spdif.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c index 9d5c470cee82..a38a3029062c 100644 --- a/sound/soc/rockchip/rockchip_spdif.c +++ b/sound/soc/rockchip/rockchip_spdif.c @@ -355,16 +355,14 @@ static int rk_spdif_probe(struct platform_device *pdev) goto err_pm_runtime; } - ret = snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); + ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); if (ret) { dev_err(&pdev->dev, "Could not register PCM\n"); - goto err_pcm_register; + goto err_pm_runtime; } return 0; -err_pcm_register: - snd_dmaengine_pcm_unregister(&pdev->dev); err_pm_runtime: pm_runtime_disable(&pdev->dev); @@ -381,8 +379,6 @@ static int rk_spdif_remove(struct platform_device *pdev) clk_disable_unprepare(spdif->mclk); clk_disable_unprepare(spdif->hclk); - snd_dmaengine_pcm_unregister(&pdev->dev); - snd_soc_unregister_component(&pdev->dev); return 0; } |