Merge branch 'for-2.6.37' into for-2.6.38

This commit is contained in:
Mark Brown 2010-11-25 11:17:24 +00:00
Родитель b26bb71f61 8b6b30ab66
Коммит 2c54c1586c
10 изменённых файлов: 53 добавлений и 22 удалений

Просмотреть файл

@ -240,6 +240,7 @@ static int __init at91sam9g20ek_init(void)
if (!at91sam9g20ek_snd_device) { if (!at91sam9g20ek_snd_device) {
printk(KERN_ERR "ASoC: Platform device allocation failed\n"); printk(KERN_ERR "ASoC: Platform device allocation failed\n");
ret = -ENOMEM; ret = -ENOMEM;
goto err_mclk;
} }
platform_set_drvdata(at91sam9g20ek_snd_device, platform_set_drvdata(at91sam9g20ek_snd_device,
@ -248,11 +249,13 @@ static int __init at91sam9g20ek_init(void)
ret = platform_device_add(at91sam9g20ek_snd_device); ret = platform_device_add(at91sam9g20ek_snd_device);
if (ret) { if (ret) {
printk(KERN_ERR "ASoC: Platform device allocation failed\n"); printk(KERN_ERR "ASoC: Platform device allocation failed\n");
platform_device_put(at91sam9g20ek_snd_device); goto err_device_add;
} }
return ret; return ret;
err_device_add:
platform_device_put(at91sam9g20ek_snd_device);
err_mclk: err_mclk:
clk_put(mclk); clk_put(mclk);
mclk = NULL; mclk = NULL;

Просмотреть файл

@ -167,7 +167,6 @@ static int __init afeb9260_soc_init(void)
return 0; return 0;
err1: err1:
platform_device_del(afeb9260_snd_device);
platform_device_put(afeb9260_snd_device); platform_device_put(afeb9260_snd_device);
return err; return err;
} }

Просмотреть файл

@ -247,7 +247,10 @@ fail:
static int davinci_vcif_remove(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); snd_soc_unregister_dai(&pdev->dev);
kfree(davinci_vcif_dev);
return 0; return 0;
} }

Просмотреть файл

@ -54,24 +54,26 @@ static int __init simone_init(void)
ret = platform_device_add(simone_snd_ac97_device); ret = platform_device_add(simone_snd_ac97_device);
if (ret) if (ret)
goto fail; goto fail1;
simone_snd_device = platform_device_alloc("soc-audio", -1); simone_snd_device = platform_device_alloc("soc-audio", -1);
if (!simone_snd_device) { if (!simone_snd_device) {
ret = -ENOMEM; ret = -ENOMEM;
goto fail; goto fail2;
} }
platform_set_drvdata(simone_snd_device, &snd_soc_simone); platform_set_drvdata(simone_snd_device, &snd_soc_simone);
ret = platform_device_add(simone_snd_device); ret = platform_device_add(simone_snd_device);
if (ret) { if (ret)
platform_device_put(simone_snd_device); goto fail3;
goto fail;
}
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); platform_device_put(simone_snd_ac97_device);
return ret; return ret;
} }

Просмотреть файл

@ -76,6 +76,7 @@ static __init int efika_fabric_init(void)
rc = platform_device_add(pdev); rc = platform_device_add(pdev);
if (rc) { if (rc) {
pr_err("efika_fabric_init: platform_device_add() failed\n"); pr_err("efika_fabric_init: platform_device_add() failed\n");
platform_device_put(pdev);
return -ENODEV; return -ENODEV;
} }
return 0; return 0;

Просмотреть файл

@ -76,6 +76,7 @@ static __init int pcm030_fabric_init(void)
rc = platform_device_add(pdev); rc = platform_device_add(pdev);
if (rc) { if (rc) {
pr_err("pcm030_fabric_init: platform_device_add() failed\n"); pr_err("pcm030_fabric_init: platform_device_add() failed\n");
platform_device_put(pdev);
return -ENODEV; return -ENODEV;
} }
return 0; return 0;

Просмотреть файл

@ -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); 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; goto failed_pdev_fiq_alloc;
}
platform_set_drvdata(ssi->soc_platform_pdev_fiq, ssi); platform_set_drvdata(ssi->soc_platform_pdev_fiq, ssi);
ret = platform_device_add(ssi->soc_platform_pdev_fiq); ret = platform_device_add(ssi->soc_platform_pdev_fiq);
if (ret) { if (ret) {
@ -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); 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; goto failed_pdev_alloc;
}
platform_set_drvdata(ssi->soc_platform_pdev, ssi); platform_set_drvdata(ssi->soc_platform_pdev, ssi);
ret = platform_device_add(ssi->soc_platform_pdev); ret = platform_device_add(ssi->soc_platform_pdev);
if (ret) { if (ret) {
@ -703,6 +709,7 @@ static int imx_ssi_probe(struct platform_device *pdev)
failed_pdev_add: failed_pdev_add:
platform_device_put(ssi->soc_platform_pdev); platform_device_put(ssi->soc_platform_pdev);
failed_pdev_alloc: failed_pdev_alloc:
platform_device_del(ssi->soc_platform_pdev_fiq);
failed_pdev_fiq_add: failed_pdev_fiq_add:
platform_device_put(ssi->soc_platform_pdev_fiq); platform_device_put(ssi->soc_platform_pdev_fiq);
failed_pdev_fiq_alloc: failed_pdev_fiq_alloc:
@ -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 resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct imx_ssi *ssi = platform_get_drvdata(pdev); struct imx_ssi *ssi = platform_get_drvdata(pdev);
platform_device_del(ssi->soc_platform_pdev); platform_device_unregister(ssi->soc_platform_pdev);
platform_device_put(ssi->soc_platform_pdev); platform_device_unregister(ssi->soc_platform_pdev_fiq);
snd_soc_unregister_dai(&pdev->dev); snd_soc_unregister_dai(&pdev->dev);

Просмотреть файл

@ -42,6 +42,7 @@ static struct snd_soc_card imx_phycore = {
.num_links = ARRAY_SIZE(imx_phycore_dai_ac97), .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 struct platform_device *imx_phycore_snd_device;
static int __init imx_phycore_init(void) static int __init imx_phycore_init(void)
@ -52,29 +53,42 @@ static int __init imx_phycore_init(void)
/* return happy. We might run on a totally different machine */ /* return happy. We might run on a totally different machine */
return 0; return 0;
imx_phycore_snd_device = platform_device_alloc("soc-audio", -1); imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1);
if (!imx_phycore_snd_device) if (!imx_phycore_snd_ac97_device)
return -ENOMEM; return -ENOMEM;
platform_set_drvdata(imx_phycore_snd_device, &imx_phycore); platform_set_drvdata(imx_phycore_snd_ac97_device, &imx_phycore);
ret = platform_device_add(imx_phycore_snd_device); ret = platform_device_add(imx_phycore_snd_ac97_device);
if (ret)
goto fail1;
imx_phycore_snd_device = platform_device_alloc("wm9712-codec", -1); imx_phycore_snd_device = platform_device_alloc("wm9712-codec", -1);
if (!imx_phycore_snd_device) if (!imx_phycore_snd_device) {
return -ENOMEM; ret = -ENOMEM;
goto fail2;
}
ret = platform_device_add(imx_phycore_snd_device); ret = platform_device_add(imx_phycore_snd_device);
if (ret) { if (ret) {
printk(KERN_ERR "ASoC: Platform device allocation failed\n"); 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; return ret;
} }
static void __exit imx_phycore_exit(void) static void __exit imx_phycore_exit(void)
{ {
platform_device_unregister(imx_phycore_snd_device); platform_device_unregister(imx_phycore_snd_device);
platform_device_unregister(imx_phycore_snd_ac97_device);
} }
late_initcall(imx_phycore_init); late_initcall(imx_phycore_init);

Просмотреть файл

@ -1,6 +1,7 @@
config SND_PXA2XX_SOC config SND_PXA2XX_SOC
tristate "SoC Audio for the Intel PXA2xx chip" tristate "SoC Audio for the Intel PXA2xx chip"
depends on ARCH_PXA depends on ARCH_PXA
select SND_ARM
select SND_PXA2XX_LIB select SND_PXA2XX_LIB
help help
Say Y or M if you want to add support for codecs attached to Say Y or M if you want to add support for codecs attached to

Просмотреть файл

@ -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) 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; return 0;
} }