summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra20_ac97.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-03-21 03:37:44 -0700
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-26 21:57:50 +0000
commit359e2cb749a896ab7d2e2320892e6fe8457d1cfc (patch)
treed1d2e0450916fece68ccb11400e6178a7b110222 /sound/soc/tegra/tegra20_ac97.c
parent094e1a3d7d7d456b504058ed40ea19d40e05a7ff (diff)
ASoC: switch over to use snd_soc_register_component() on tegra20 ac97
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/tegra/tegra20_ac97.c')
-rw-r--r--sound/soc/tegra/tegra20_ac97.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index 336dcdd3e8a4..b5cee92f82e8 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -248,6 +248,10 @@ static struct snd_soc_dai_driver tegra20_ac97_dai = {
.ops = &tegra20_ac97_dai_ops,
};
+static const struct snd_soc_component_driver tegra20_ac97_component = {
+ .name = DRV_NAME,
+};
+
static bool tegra20_ac97_wr_rd_reg(struct device *dev, unsigned int reg)
{
switch (reg) {
@@ -398,7 +402,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
ac97->playback_dma_data.width = 32;
ac97->playback_dma_data.req_sel = of_dma[1];
- ret = snd_soc_register_dais(&pdev->dev, &tegra20_ac97_dai, 1);
+ ret = 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;
@@ -408,7 +413,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_dai;
+ goto err_unregister_component;
}
ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev);
@@ -434,8 +439,8 @@ err_asoc_utils_fini:
tegra_asoc_utils_fini(&ac97->util_data);
err_unregister_pcm:
tegra_pcm_platform_unregister(&pdev->dev);
-err_unregister_dai:
- snd_soc_unregister_dai(&pdev->dev);
+err_unregister_component:
+ snd_soc_unregister_component(&pdev->dev);
err_clk_put:
clk_put(ac97->clk_ac97);
err:
@@ -447,7 +452,7 @@ 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_dai(&pdev->dev);
+ snd_soc_unregister_component(&pdev->dev);
tegra_asoc_utils_fini(&ac97->util_data);