Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230288
b: refs/heads/master
c: 2c54c15
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Nov 25, 2010
1 parent fde7d63 commit 8370445
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 23 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: b26bb71f610f9b346203bff407e4278d98f9fe80
refs/heads/master: 2c54c1586c78775cfdfb071e68b27e14b668921f
5 changes: 4 additions & 1 deletion trunk/sound/soc/atmel/sam9g20_wm8731.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ static int __init at91sam9g20ek_init(void)
if (!at91sam9g20ek_snd_device) {
printk(KERN_ERR "ASoC: Platform device allocation failed\n");
ret = -ENOMEM;
goto err_mclk;
}

platform_set_drvdata(at91sam9g20ek_snd_device,
Expand All @@ -248,11 +249,13 @@ static int __init at91sam9g20ek_init(void)
ret = platform_device_add(at91sam9g20ek_snd_device);
if (ret) {
printk(KERN_ERR "ASoC: Platform device allocation failed\n");
platform_device_put(at91sam9g20ek_snd_device);
goto err_device_add;
}

return ret;

err_device_add:
platform_device_put(at91sam9g20ek_snd_device);
err_mclk:
clk_put(mclk);
mclk = NULL;
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/atmel/snd-soc-afeb9260.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ static int __init afeb9260_soc_init(void)

return 0;
err1:
platform_device_del(afeb9260_snd_device);
platform_device_put(afeb9260_snd_device);
return err;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/sound/soc/davinci/davinci-vcif.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ static int davinci_vcif_probe(struct platform_device *pdev)

static int davinci_vcif_remove(struct platform_device *pdev)
{
struct davinci_vcif_dev *davinci_vcif_dev = dev_get_drvdata(&pdev->dev);

snd_soc_unregister_dai(&pdev->dev);
kfree(davinci_vcif_dev);

return 0;
}
Expand Down
18 changes: 10 additions & 8 deletions trunk/sound/soc/ep93xx/simone.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,26 @@ static int __init simone_init(void)

ret = platform_device_add(simone_snd_ac97_device);
if (ret)
goto fail;
goto fail1;

simone_snd_device = platform_device_alloc("soc-audio", -1);
if (!simone_snd_device) {
ret = -ENOMEM;
goto fail;
goto fail2;
}

platform_set_drvdata(simone_snd_device, &snd_soc_simone);
ret = platform_device_add(simone_snd_device);
if (ret) {
platform_device_put(simone_snd_device);
goto fail;
}
if (ret)
goto fail3;

return ret;
return 0;

fail:
fail3:
platform_device_put(simone_snd_device);
fail2:
platform_device_del(simone_snd_ac97_device);
fail1:
platform_device_put(simone_snd_ac97_device);
return ret;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/fsl/efika-audio-fabric.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ static __init int efika_fabric_init(void)
rc = platform_device_add(pdev);
if (rc) {
pr_err("efika_fabric_init: platform_device_add() failed\n");
platform_device_put(pdev);
return -ENODEV;
}
return 0;
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/fsl/pcm030-audio-fabric.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ static __init int pcm030_fabric_init(void)
rc = platform_device_add(pdev);
if (rc) {
pr_err("pcm030_fabric_init: platform_device_add() failed\n");
platform_device_put(pdev);
return -ENODEV;
}
return 0;
Expand Down
15 changes: 11 additions & 4 deletions trunk/sound/soc/imx/imx-ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,11 @@ static int imx_ssi_probe(struct platform_device *pdev)
}

ssi->soc_platform_pdev_fiq = platform_device_alloc("imx-fiq-pcm-audio", pdev->id);
if (!ssi->soc_platform_pdev_fiq)
if (!ssi->soc_platform_pdev_fiq) {
ret = -ENOMEM;
goto failed_pdev_fiq_alloc;
}

platform_set_drvdata(ssi->soc_platform_pdev_fiq, ssi);
ret = platform_device_add(ssi->soc_platform_pdev_fiq);
if (ret) {
Expand All @@ -689,8 +692,11 @@ static int imx_ssi_probe(struct platform_device *pdev)
}

ssi->soc_platform_pdev = platform_device_alloc("imx-pcm-audio", pdev->id);
if (!ssi->soc_platform_pdev)
if (!ssi->soc_platform_pdev) {
ret = -ENOMEM;
goto failed_pdev_alloc;
}

platform_set_drvdata(ssi->soc_platform_pdev, ssi);
ret = platform_device_add(ssi->soc_platform_pdev);
if (ret) {
Expand All @@ -703,6 +709,7 @@ static int imx_ssi_probe(struct platform_device *pdev)
failed_pdev_add:
platform_device_put(ssi->soc_platform_pdev);
failed_pdev_alloc:
platform_device_del(ssi->soc_platform_pdev_fiq);
failed_pdev_fiq_add:
platform_device_put(ssi->soc_platform_pdev_fiq);
failed_pdev_fiq_alloc:
Expand All @@ -726,8 +733,8 @@ static int __devexit imx_ssi_remove(struct platform_device *pdev)
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct imx_ssi *ssi = platform_get_drvdata(pdev);

platform_device_del(ssi->soc_platform_pdev);
platform_device_put(ssi->soc_platform_pdev);
platform_device_unregister(ssi->soc_platform_pdev);
platform_device_unregister(ssi->soc_platform_pdev_fiq);

snd_soc_unregister_dai(&pdev->dev);

Expand Down
28 changes: 21 additions & 7 deletions trunk/sound/soc/imx/phycore-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ static struct snd_soc_card imx_phycore = {
.num_links = ARRAY_SIZE(imx_phycore_dai_ac97),
};

static struct platform_device *imx_phycore_snd_ac97_device;
static struct platform_device *imx_phycore_snd_device;

static int __init imx_phycore_init(void)
Expand All @@ -52,29 +53,42 @@ static int __init imx_phycore_init(void)
/* return happy. We might run on a totally different machine */
return 0;

imx_phycore_snd_device = platform_device_alloc("soc-audio", -1);
if (!imx_phycore_snd_device)
imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1);
if (!imx_phycore_snd_ac97_device)
return -ENOMEM;

platform_set_drvdata(imx_phycore_snd_device, &imx_phycore);
ret = platform_device_add(imx_phycore_snd_device);
platform_set_drvdata(imx_phycore_snd_ac97_device, &imx_phycore);
ret = platform_device_add(imx_phycore_snd_ac97_device);
if (ret)
goto fail1;

imx_phycore_snd_device = platform_device_alloc("wm9712-codec", -1);
if (!imx_phycore_snd_device)
return -ENOMEM;
if (!imx_phycore_snd_device) {
ret = -ENOMEM;
goto fail2;
}
ret = platform_device_add(imx_phycore_snd_device);

if (ret) {
printk(KERN_ERR "ASoC: Platform device allocation failed\n");
platform_device_put(imx_phycore_snd_device);
goto fail3;
}

return 0;

fail3:
platform_device_put(imx_phycore_snd_device);
fail2:
platform_device_del(imx_phycore_snd_ac97_device);
fail1:
platform_device_put(imx_phycore_snd_ac97_device);
return ret;
}

static void __exit imx_phycore_exit(void)
{
platform_device_unregister(imx_phycore_snd_device);
platform_device_unregister(imx_phycore_snd_ac97_device);
}

late_initcall(imx_phycore_init);
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/pxa/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
config SND_PXA2XX_SOC
tristate "SoC Audio for the Intel PXA2xx chip"
depends on ARCH_PXA
select SND_ARM
select SND_PXA2XX_LIB
help
Say Y or M if you want to add support for codecs attached to
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/sh/ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ static int __devinit sh4_soc_dai_probe(struct platform_device *pdev)

static int __devexit sh4_soc_dai_remove(struct platform_device *pdev)
{
snd_soc_unregister_dai(&pdev->dev, ARRAY_SIZE(sh4_ssi_dai));
snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(sh4_ssi_dai));
return 0;
}

Expand Down

0 comments on commit 8370445

Please sign in to comment.