goto err4;
}
- ret = snd_soc_register_component(&pdev->dev, &s3c_ac97_component,
+ ret = devm_snd_soc_register_component(&pdev->dev, &s3c_ac97_component,
s3c_ac97_dai, ARRAY_SIZE(s3c_ac97_dai));
if (ret)
goto err5;
ret = samsung_asoc_dma_platform_register(&pdev->dev);
if (ret) {
dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret);
- goto err6;
+ goto err5;
}
return 0;
-err6:
- snd_soc_unregister_component(&pdev->dev);
err5:
free_irq(irq_res->start, NULL);
err4:
{
struct resource *irq_res;
- snd_soc_unregister_component(&pdev->dev);
-
irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (irq_res)
free_irq(irq_res->start, NULL);
return -ENOMEM;
/* register voice DAI here */
- ret = snd_soc_register_component(&goni_snd_device->dev, &voice_component,
- &voice_dai, 1);
+ ret = devm_snd_soc_register_component(&goni_snd_device->dev,
+ &voice_component, &voice_dai, 1);
if (ret) {
platform_device_put(goni_snd_device);
return ret;
platform_set_drvdata(goni_snd_device, &goni);
ret = platform_device_add(goni_snd_device);
- if (ret) {
- snd_soc_unregister_component(&goni_snd_device->dev);
+ if (ret)
platform_device_put(goni_snd_device);
- }
return ret;
}
static void __exit goni_exit(void)
{
- snd_soc_unregister_component(&goni_snd_device->dev);
platform_device_unregister(goni_snd_device);
}
pm_runtime_enable(&pdev->dev);
- ret = snd_soc_register_component(&pdev->dev, &s3c_pcm_component,
+ ret = devm_snd_soc_register_component(&pdev->dev, &s3c_pcm_component,
&s3c_pcm_dai[pdev->id], 1);
if (ret != 0) {
dev_err(&pdev->dev, "failed to get register DAI: %d\n", ret);
ret = samsung_asoc_dma_platform_register(&pdev->dev);
if (ret) {
dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret);
- goto err6;
+ goto err5;
}
return 0;
-err6:
- snd_soc_unregister_component(&pdev->dev);
err5:
clk_disable_unprepare(pcm->pclk);
clk_put(pcm->pclk);
struct s3c_pcm_info *pcm = &s3c_pcm[pdev->id];
struct resource *mem_res;
- snd_soc_unregister_component(&pdev->dev);
-
pm_runtime_disable(&pdev->dev);
iounmap(pcm->regs);
dai_drv->suspend = s3c2412_i2s_suspend;
dai_drv->resume = s3c2412_i2s_resume;
- return snd_soc_register_component(dev, cmp_drv, dai_drv, 1);
+ return devm_snd_soc_register_component(dev, cmp_drv, dai_drv, 1);
}
EXPORT_SYMBOL_GPL(s3c_i2sv2_register_component);
}
ret = samsung_asoc_dma_platform_register(&pdev->dev);
- if (ret) {
+ if (ret)
pr_err("failed to register the DMA: %d\n", ret);
- goto err;
- }
- return 0;
-err:
- snd_soc_unregister_component(&pdev->dev);
return ret;
}
-static int s3c2412_iis_dev_remove(struct platform_device *pdev)
-{
- snd_soc_unregister_component(&pdev->dev);
- return 0;
-}
-
static struct platform_driver s3c2412_iis_driver = {
.probe = s3c2412_iis_dev_probe,
- .remove = s3c2412_iis_dev_remove,
.driver = {
.name = "s3c2412-iis",
.owner = THIS_MODULE,
{
int ret = 0;
- ret = snd_soc_register_component(&pdev->dev, &s3c24xx_i2s_component,
- &s3c24xx_i2s_dai, 1);
+ ret = devm_snd_soc_register_component(&pdev->dev,
+ &s3c24xx_i2s_component, &s3c24xx_i2s_dai, 1);
if (ret) {
pr_err("failed to register the dai\n");
return ret;
}
ret = samsung_asoc_dma_platform_register(&pdev->dev);
- if (ret) {
+ if (ret)
pr_err("failed to register the dma: %d\n", ret);
- goto err;
- }
- return 0;
-err:
- snd_soc_unregister_component(&pdev->dev);
return ret;
}
-static int s3c24xx_iis_dev_remove(struct platform_device *pdev)
-{
- snd_soc_unregister_component(&pdev->dev);
- return 0;
-}
-
static struct platform_driver s3c24xx_iis_driver = {
.probe = s3c24xx_iis_dev_probe,
- .remove = s3c24xx_iis_dev_remove,
.driver = {
.name = "s3c24xx-iis",
.owner = THIS_MODULE,
dev_set_drvdata(&pdev->dev, spdif);
- ret = snd_soc_register_component(&pdev->dev, &samsung_spdif_component,
- &samsung_spdif_dai, 1);
+ ret = devm_snd_soc_register_component(&pdev->dev,
+ &samsung_spdif_component, &samsung_spdif_dai, 1);
if (ret != 0) {
dev_err(&pdev->dev, "fail to register dai\n");
goto err4;
ret = samsung_asoc_dma_platform_register(&pdev->dev);
if (ret) {
dev_err(&pdev->dev, "failed to register DMA: %d\n", ret);
- goto err5;
+ goto err4;
}
return 0;
-err5:
- snd_soc_unregister_component(&pdev->dev);
err4:
iounmap(spdif->regs);
err3:
struct samsung_spdif_info *spdif = &spdif_info;
struct resource *mem_res;
- snd_soc_unregister_component(&pdev->dev);
-
iounmap(spdif->regs);
mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);