]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/blobdiff - sound/soc/samsung/ac97.c
Merge tag 'asoc-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
[can-eth-gw-linux.git] / sound / soc / samsung / ac97.c
index 386bab1f99abe9d05032dbbe819edddace9fe42f..0df3c5644cfafb9629621b728339157cc8496cc7 100644 (file)
@@ -370,7 +370,7 @@ static struct snd_soc_dai_driver s3c_ac97_dai[] = {
        },
 };
 
-static __devinit int s3c_ac97_probe(struct platform_device *pdev)
+static int s3c_ac97_probe(struct platform_device *pdev)
 {
        struct resource *mem_res, *dmatx_res, *dmarx_res, *dmamic_res, *irq_res;
        struct s3c_audio_pdata *ac97_pdata;
@@ -462,8 +462,15 @@ static __devinit int s3c_ac97_probe(struct platform_device *pdev)
        if (ret)
                goto err5;
 
-       return 0;
+       ret = asoc_dma_platform_register(&pdev->dev);
+       if (ret) {
+               dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret);
+               goto err6;
+       }
 
+       return 0;
+err6:
+       snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(s3c_ac97_dai));
 err5:
        free_irq(irq_res->start, NULL);
 err4:
@@ -478,10 +485,11 @@ err1:
        return ret;
 }
 
-static __devexit int s3c_ac97_remove(struct platform_device *pdev)
+static int s3c_ac97_remove(struct platform_device *pdev)
 {
        struct resource *mem_res, *irq_res;
 
+       asoc_dma_platform_unregister(&pdev->dev);
        snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(s3c_ac97_dai));
 
        irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
@@ -502,7 +510,7 @@ static __devexit int s3c_ac97_remove(struct platform_device *pdev)
 
 static struct platform_driver s3c_ac97_driver = {
        .probe  = s3c_ac97_probe,
-       .remove = __devexit_p(s3c_ac97_remove),
+       .remove = s3c_ac97_remove,
        .driver = {
                .name = "samsung-ac97",
                .owner = THIS_MODULE,