summaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra/tegra_wm9712.c
diff options
context:
space:
mode:
authorSowjanya Komatineni <skomatineni@nvidia.com>2020-01-13 23:24:17 -0800
committerThierry Reding <treding@nvidia.com>2020-04-21 16:53:12 +0200
commit0de6db30ef79b391cedd749801a49c485d2daf4b (patch)
tree7a65c3cd120a01b2875217b3ca28952c1bd9762a /sound/soc/tegra/tegra_wm9712.c
parent8f3d9f354286745c751374f5f1fcafee6b3f3136 (diff)
downloadlinux-0de6db30ef79b391cedd749801a49c485d2daf4b.tar.bz2
ASoC: tegra: Use device managed resource APIs to get the clock
tegra_asoc_utils uses clk_get() to get the clock and clk_put() to free them explicitly. This patch updates it to use device managed resource API devm_clk_get() so the clock will be automatically released and freed when the device is unbound and removes tegra_asoc_utils_fini() as its no longer needed. Tested-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Sameer Pujar <spujar@nvidia.com> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'sound/soc/tegra/tegra_wm9712.c')
-rw-r--r--sound/soc/tegra/tegra_wm9712.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/soc/tegra/tegra_wm9712.c b/sound/soc/tegra/tegra_wm9712.c
index b85bd9f89073..726edfa21a29 100644
--- a/sound/soc/tegra/tegra_wm9712.c
+++ b/sound/soc/tegra/tegra_wm9712.c
@@ -113,19 +113,17 @@ static int tegra_wm9712_driver_probe(struct platform_device *pdev)
ret = tegra_asoc_utils_set_ac97_rate(&machine->util_data);
if (ret)
- goto asoc_utils_fini;
+ goto codec_unregister;
ret = snd_soc_register_card(card);
if (ret) {
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
ret);
- goto asoc_utils_fini;
+ goto codec_unregister;
}
return 0;
-asoc_utils_fini:
- tegra_asoc_utils_fini(&machine->util_data);
codec_unregister:
platform_device_del(machine->codec);
codec_put:
@@ -140,8 +138,6 @@ static int tegra_wm9712_driver_remove(struct platform_device *pdev)
snd_soc_unregister_card(card);
- tegra_asoc_utils_fini(&machine->util_data);
-
platform_device_unregister(machine->codec);
return 0;