ASoC: samsung: Add devm_clk_get to pcm.c
[deliverable/linux.git] / sound / soc / samsung / spdif.c
index 28487dcc4538b939bd86a82395bb7299c2a5d243..e93a93e296f470b3557a70d1d455a59f2617d419 100644 (file)
@@ -18,7 +18,6 @@
 #include <sound/pcm_params.h>
 
 #include <linux/platform_data/asoc-s3c.h>
-#include <mach/dma.h>
 
 #include "dma.h"
 #include "spdif.h"
@@ -94,7 +93,7 @@ struct samsung_spdif_info {
        struct s3c_dma_params   *dma_playback;
 };
 
-static struct s3c2410_dma_client spdif_dma_client_out = {
+static struct s3c_dma_client spdif_dma_client_out = {
        .name           = "S/PDIF Stereo out",
 };
 
@@ -428,8 +427,8 @@ static int spdif_probe(struct platform_device *pdev)
 
        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;
@@ -445,12 +444,10 @@ static int spdif_probe(struct platform_device *pdev)
        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:
@@ -468,9 +465,6 @@ static int spdif_remove(struct platform_device *pdev)
        struct samsung_spdif_info *spdif = &spdif_info;
        struct resource *mem_res;
 
-       samsung_asoc_dma_platform_unregister(&pdev->dev);
-       snd_soc_unregister_component(&pdev->dev);
-
        iounmap(spdif->regs);
 
        mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
This page took 0.024716 seconds and 5 git commands to generate.