Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371811
b: refs/heads/master
c: bfcb921
h: refs/heads/master
i:
  371809: 05902f4
  371807: 7fabd70
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Mar 26, 2013
1 parent c936ac2 commit 2e1715b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1422b8cb443c6cfc58da38394673b8b8eda6458
refs/heads/master: bfcb921caf37ceccb4bb474d7f426f016bf81efa
15 changes: 10 additions & 5 deletions trunk/sound/soc/davinci/davinci-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,10 @@ static struct snd_soc_dai_driver davinci_i2s_dai = {

};

static const struct snd_soc_component_driver davinci_i2s_component = {
.name = "davinci-i2s",
};

static int davinci_i2s_probe(struct platform_device *pdev)
{
struct snd_platform_data *pdata = pdev->dev.platform_data;
Expand Down Expand Up @@ -727,20 +731,21 @@ static int davinci_i2s_probe(struct platform_device *pdev)

dev_set_drvdata(&pdev->dev, dev);

ret = snd_soc_register_dai(&pdev->dev, &davinci_i2s_dai);
ret = snd_soc_register_component(&pdev->dev, &davinci_i2s_component,
&davinci_i2s_dai, 1);
if (ret != 0)
goto err_release_clk;

ret = davinci_soc_platform_register(&pdev->dev);
if (ret) {
dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
goto err_unregister_dai;
goto err_unregister_component;
}

return 0;

err_unregister_dai:
snd_soc_unregister_dai(&pdev->dev);
err_unregister_component:
snd_soc_unregister_component(&pdev->dev);
err_release_clk:
clk_disable(dev->clk);
clk_put(dev->clk);
Expand All @@ -751,7 +756,7 @@ static int davinci_i2s_remove(struct platform_device *pdev)
{
struct davinci_mcbsp_dev *dev = dev_get_drvdata(&pdev->dev);

snd_soc_unregister_dai(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);
davinci_soc_platform_unregister(&pdev->dev);

clk_disable(dev->clk);
Expand Down

0 comments on commit 2e1715b

Please sign in to comment.