From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
We have devm_xxx version of snd_soc_register_component, let's use it.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/tegra/tegra20_ac97.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index 09c8516..da71e28 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -377,8 +377,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) goto err_clk_disable_unprepare; }
- ret = snd_soc_register_component(&pdev->dev, &tegra20_ac97_component, - &tegra20_ac97_dai, 1); + ret = devm_snd_soc_register_component(&pdev->dev, + &tegra20_ac97_component, &tegra20_ac97_dai, 1); if (ret) { dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); ret = -ENOMEM; @@ -388,7 +388,7 @@ static int tegra20_ac97_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); - goto err_unregister_component; + goto err_clk_disable_unprepare; }
/* XXX: crufty ASoC AC97 API - only one AC97 codec allowed */ @@ -396,8 +396,6 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
return 0;
-err_unregister_component: - snd_soc_unregister_component(&pdev->dev); err_clk_disable_unprepare: clk_disable_unprepare(ac97->clk_ac97); err_clk_put: @@ -411,7 +409,6 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev) struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev);
tegra_pcm_platform_unregister(&pdev->dev); - snd_soc_unregister_component(&pdev->dev);
clk_disable_unprepare(ac97->clk_ac97);