diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-03-21 06:37:44 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-26 17:57:50 -0400 |
commit | 359e2cb749a896ab7d2e2320892e6fe8457d1cfc (patch) | |
tree | d1d2e0450916fece68ccb11400e6178a7b110222 /sound/soc/tegra/tegra20_ac97.c | |
parent | 094e1a3d7d7d456b504058ed40ea19d40e05a7ff (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.c | 15 |
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 = { | |||
248 | .ops = &tegra20_ac97_dai_ops, | 248 | .ops = &tegra20_ac97_dai_ops, |
249 | }; | 249 | }; |
250 | 250 | ||
251 | static const struct snd_soc_component_driver tegra20_ac97_component = { | ||
252 | .name = DRV_NAME, | ||
253 | }; | ||
254 | |||
251 | static bool tegra20_ac97_wr_rd_reg(struct device *dev, unsigned int reg) | 255 | static bool tegra20_ac97_wr_rd_reg(struct device *dev, unsigned int reg) |
252 | { | 256 | { |
253 | switch (reg) { | 257 | switch (reg) { |
@@ -398,7 +402,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) | |||
398 | ac97->playback_dma_data.width = 32; | 402 | ac97->playback_dma_data.width = 32; |
399 | ac97->playback_dma_data.req_sel = of_dma[1]; | 403 | ac97->playback_dma_data.req_sel = of_dma[1]; |
400 | 404 | ||
401 | ret = snd_soc_register_dais(&pdev->dev, &tegra20_ac97_dai, 1); | 405 | ret = snd_soc_register_component(&pdev->dev, &tegra20_ac97_component, |
406 | &tegra20_ac97_dai, 1); | ||
402 | if (ret) { | 407 | if (ret) { |
403 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); | 408 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); |
404 | ret = -ENOMEM; | 409 | ret = -ENOMEM; |
@@ -408,7 +413,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) | |||
408 | ret = tegra_pcm_platform_register(&pdev->dev); | 413 | ret = tegra_pcm_platform_register(&pdev->dev); |
409 | if (ret) { | 414 | if (ret) { |
410 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); | 415 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); |
411 | goto err_unregister_dai; | 416 | goto err_unregister_component; |
412 | } | 417 | } |
413 | 418 | ||
414 | ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev); | 419 | ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev); |
@@ -434,8 +439,8 @@ err_asoc_utils_fini: | |||
434 | tegra_asoc_utils_fini(&ac97->util_data); | 439 | tegra_asoc_utils_fini(&ac97->util_data); |
435 | err_unregister_pcm: | 440 | err_unregister_pcm: |
436 | tegra_pcm_platform_unregister(&pdev->dev); | 441 | tegra_pcm_platform_unregister(&pdev->dev); |
437 | err_unregister_dai: | 442 | err_unregister_component: |
438 | snd_soc_unregister_dai(&pdev->dev); | 443 | snd_soc_unregister_component(&pdev->dev); |
439 | err_clk_put: | 444 | err_clk_put: |
440 | clk_put(ac97->clk_ac97); | 445 | clk_put(ac97->clk_ac97); |
441 | err: | 446 | err: |
@@ -447,7 +452,7 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev) | |||
447 | struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev); | 452 | struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev); |
448 | 453 | ||
449 | tegra_pcm_platform_unregister(&pdev->dev); | 454 | tegra_pcm_platform_unregister(&pdev->dev); |
450 | snd_soc_unregister_dai(&pdev->dev); | 455 | snd_soc_unregister_component(&pdev->dev); |
451 | 456 | ||
452 | tegra_asoc_utils_fini(&ac97->util_data); | 457 | tegra_asoc_utils_fini(&ac97->util_data); |
453 | 458 | ||