Skip to content

Commit

Permalink
ASoC: switch over to use snd_soc_register_component() on spear spdif out
Browse files Browse the repository at this point in the history
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Mar 26, 2013
1 parent 73d86d9 commit a582d44
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sound/soc/spear/spdif_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ static struct snd_soc_dai_driver spdif_out_dai = {
.ops = &spdif_out_dai_ops,
};

static const struct snd_soc_component_driver spdif_out_component = {
.name = "spdif-out",
};

static int spdif_out_probe(struct platform_device *pdev)
{
struct spdif_out_dev *host;
Expand Down Expand Up @@ -314,7 +318,8 @@ static int spdif_out_probe(struct platform_device *pdev)

dev_set_drvdata(&pdev->dev, host);

ret = snd_soc_register_dai(&pdev->dev, &spdif_out_dai);
ret = snd_soc_register_component(&pdev->dev, &spdif_out_component,
&spdif_out_dai, 1);
if (ret != 0) {
clk_put(host->clk);
return ret;
Expand All @@ -327,7 +332,7 @@ static int spdif_out_remove(struct platform_device *pdev)
{
struct spdif_out_dev *host = dev_get_drvdata(&pdev->dev);

snd_soc_unregister_dai(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);
dev_set_drvdata(&pdev->dev, NULL);

clk_put(host->clk);
Expand Down

0 comments on commit a582d44

Please sign in to comment.