mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 12:43:55 +08:00
ASoC: switch over to use snd_soc_register_component() on tegra20 spdif
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
65328454fb
commit
094e1a3d7d
@ -182,6 +182,10 @@ static struct snd_soc_dai_driver tegra20_spdif_dai = {
|
|||||||
.ops = &tegra20_spdif_dai_ops,
|
.ops = &tegra20_spdif_dai_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct snd_soc_component_driver tegra20_spdif_component = {
|
||||||
|
.name = DRV_NAME,
|
||||||
|
};
|
||||||
|
|
||||||
static bool tegra20_spdif_wr_rd_reg(struct device *dev, unsigned int reg)
|
static bool tegra20_spdif_wr_rd_reg(struct device *dev, unsigned int reg)
|
||||||
{
|
{
|
||||||
switch (reg) {
|
switch (reg) {
|
||||||
@ -329,7 +333,8 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
|
|||||||
goto err_pm_disable;
|
goto err_pm_disable;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = snd_soc_register_dai(&pdev->dev, &tegra20_spdif_dai);
|
ret = snd_soc_register_component(&pdev->dev, &tegra20_spdif_component,
|
||||||
|
&tegra20_spdif_dai, 1);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
|
dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
@ -339,13 +344,13 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
|
|||||||
ret = tegra_pcm_platform_register(&pdev->dev);
|
ret = tegra_pcm_platform_register(&pdev->dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
|
dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
|
||||||
goto err_unregister_dai;
|
goto err_unregister_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_unregister_dai:
|
err_unregister_component:
|
||||||
snd_soc_unregister_dai(&pdev->dev);
|
snd_soc_unregister_component(&pdev->dev);
|
||||||
err_suspend:
|
err_suspend:
|
||||||
if (!pm_runtime_status_suspended(&pdev->dev))
|
if (!pm_runtime_status_suspended(&pdev->dev))
|
||||||
tegra20_spdif_runtime_suspend(&pdev->dev);
|
tegra20_spdif_runtime_suspend(&pdev->dev);
|
||||||
@ -366,7 +371,7 @@ static int tegra20_spdif_platform_remove(struct platform_device *pdev)
|
|||||||
tegra20_spdif_runtime_suspend(&pdev->dev);
|
tegra20_spdif_runtime_suspend(&pdev->dev);
|
||||||
|
|
||||||
tegra_pcm_platform_unregister(&pdev->dev);
|
tegra_pcm_platform_unregister(&pdev->dev);
|
||||||
snd_soc_unregister_dai(&pdev->dev);
|
snd_soc_unregister_component(&pdev->dev);
|
||||||
|
|
||||||
clk_put(spdif->clk_spdif_out);
|
clk_put(spdif->clk_spdif_out);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user