Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342783
b: refs/heads/master
c: 1428c20
h: refs/heads/master
i:
  342781: e7c00bc
  342779: 8073172
  342775: 7ccbf2a
  342767: 52c2a46
  342751: 5d2e371
  342719: 309bc8e
  342655: c136e05
  342527: 90b7387
v: v3
  • Loading branch information
Lee Jones authored and Mark Brown committed Nov 23, 2012
1 parent da31a80 commit fcefb45
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 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: f61ab093828df646b5df35f244577859efe4329c
refs/heads/master: 1428c20f7c38e9fbf59923d1b9615ebdaf2862b7
4 changes: 2 additions & 2 deletions trunk/sound/soc/ux500/mop500.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct snd_soc_dai_link mop500_dai_links[] = {
.stream_name = "ab8500_0",
.cpu_dai_name = "ux500-msp-i2s.1",
.codec_dai_name = "ab8500-codec-dai.0",
.platform_name = "ux500-pcm.0",
.platform_name = "ux500-msp-i2s.1",
.codec_name = "ab8500-codec.0",
.init = mop500_ab8500_machine_init,
.ops = mop500_ab8500_ops,
Expand All @@ -43,7 +43,7 @@ struct snd_soc_dai_link mop500_dai_links[] = {
.stream_name = "ab8500_1",
.cpu_dai_name = "ux500-msp-i2s.3",
.codec_dai_name = "ab8500-codec-dai.1",
.platform_name = "ux500-pcm.0",
.platform_name = "ux500-msp-i2s.3",
.codec_name = "ab8500-codec.0",
.init = NULL,
.ops = mop500_ab8500_ops,
Expand Down
13 changes: 13 additions & 0 deletions trunk/sound/soc/ux500/ux500_msp_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include "ux500_msp_i2s.h"
#include "ux500_msp_dai.h"
#include "ux500_pcm.h"

static int setup_pcm_multichan(struct snd_soc_dai *dai,
struct ux500_msp_config *msp_config)
Expand Down Expand Up @@ -832,8 +833,18 @@ static int __devinit ux500_msp_drv_probe(struct platform_device *pdev)
goto err_init_msp;
}

ret = ux500_pcm_register_platform(pdev);
if (ret < 0) {
dev_err(&pdev->dev,
"Error: %s: Failed to register PCM platform device!\n",
__func__);
goto err_reg_plat;
}

return 0;

err_reg_plat:
snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(ux500_msp_dai_drv));
err_init_msp:
clk_put(drvdata->clk);
err_clk:
Expand All @@ -848,6 +859,8 @@ static int __devexit ux500_msp_drv_remove(struct platform_device *pdev)
{
struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(&pdev->dev);

ux500_pcm_unregister_platform(pdev);

snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(ux500_msp_dai_drv));

devm_regulator_put(drvdata->reg_vape);
Expand Down
19 changes: 4 additions & 15 deletions trunk/sound/soc/ux500/ux500_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ static struct snd_soc_platform_driver ux500_pcm_soc_drv = {
.pcm_new = ux500_pcm_new,
};

static int __devexit ux500_pcm_drv_probe(struct platform_device *pdev)
int __devinit ux500_pcm_register_platform(struct platform_device *pdev)
{
int ret;

Expand All @@ -296,23 +296,12 @@ static int __devexit ux500_pcm_drv_probe(struct platform_device *pdev)

return 0;
}
EXPORT_SYMBOL_GPL(ux500_pcm_register_platform);

static int __devinit ux500_pcm_drv_remove(struct platform_device *pdev)
int __devexit ux500_pcm_unregister_platform(struct platform_device *pdev)
{
snd_soc_unregister_platform(&pdev->dev);

return 0;
}

static struct platform_driver ux500_pcm_driver = {
.driver = {
.name = "ux500-pcm",
.owner = THIS_MODULE,
},

.probe = ux500_pcm_drv_probe,
.remove = __devexit_p(ux500_pcm_drv_remove),
};
module_platform_driver(ux500_pcm_driver);

MODULE_LICENSE("GPL v2");
EXPORT_SYMBOL_GPL(ux500_pcm_unregister_platform);
3 changes: 3 additions & 0 deletions trunk/sound/soc/ux500/ux500_pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@
#define UX500_PLATFORM_PERIODS_MAX 48
#define UX500_PLATFORM_BUFFER_BYTES_MAX (2048 * PAGE_SIZE)

int ux500_pcm_register_platform(struct platform_device *pdev);
int ux500_pcm_unregister_platform(struct platform_device *pdev);

#endif

0 comments on commit fcefb45

Please sign in to comment.