diff options
Diffstat (limited to 'sound/soc/samsung/spdif.c')
-rw-r--r-- | sound/soc/samsung/spdif.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index bc24c7af02b2..5008e5bd6ed8 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c @@ -357,7 +357,7 @@ static struct snd_soc_dai_driver samsung_spdif_dai = { .resume = spdif_resume, }; -static __devinit int spdif_probe(struct platform_device *pdev) +static int spdif_probe(struct platform_device *pdev) { struct s3c_audio_pdata *spdif_pdata; struct resource *mem_res, *dma_res; @@ -397,7 +397,7 @@ static __devinit int spdif_probe(struct platform_device *pdev) ret = -ENOENT; goto err0; } - clk_enable(spdif->pclk); + clk_prepare_enable(spdif->pclk); spdif->sclk = clk_get(&pdev->dev, "sclk_spdif"); if (IS_ERR(spdif->sclk)) { @@ -405,7 +405,7 @@ static __devinit int spdif_probe(struct platform_device *pdev) ret = -ENOENT; goto err1; } - clk_enable(spdif->sclk); + clk_prepare_enable(spdif->sclk); /* Request S/PDIF Register's memory region */ if (!request_mem_region(mem_res->start, @@ -437,27 +437,35 @@ static __devinit int spdif_probe(struct platform_device *pdev) spdif->dma_playback = &spdif_stereo_out; - return 0; + ret = asoc_dma_platform_register(&pdev->dev); + if (ret) { + dev_err(&pdev->dev, "failed to register DMA: %d\n", ret); + goto err5; + } + return 0; +err5: + snd_soc_unregister_dai(&pdev->dev); err4: iounmap(spdif->regs); err3: release_mem_region(mem_res->start, resource_size(mem_res)); err2: - clk_disable(spdif->sclk); + clk_disable_unprepare(spdif->sclk); clk_put(spdif->sclk); err1: - clk_disable(spdif->pclk); + clk_disable_unprepare(spdif->pclk); clk_put(spdif->pclk); err0: return ret; } -static __devexit int spdif_remove(struct platform_device *pdev) +static int spdif_remove(struct platform_device *pdev) { struct samsung_spdif_info *spdif = &spdif_info; struct resource *mem_res; + asoc_dma_platform_unregister(&pdev->dev); snd_soc_unregister_dai(&pdev->dev); iounmap(spdif->regs); @@ -466,9 +474,9 @@ static __devexit int spdif_remove(struct platform_device *pdev) if (mem_res) release_mem_region(mem_res->start, resource_size(mem_res)); - clk_disable(spdif->sclk); + clk_disable_unprepare(spdif->sclk); clk_put(spdif->sclk); - clk_disable(spdif->pclk); + clk_disable_unprepare(spdif->pclk); clk_put(spdif->pclk); return 0; @@ -476,7 +484,7 @@ static __devexit int spdif_remove(struct platform_device *pdev) static struct platform_driver samsung_spdif_driver = { .probe = spdif_probe, - .remove = __devexit_p(spdif_remove), + .remove = spdif_remove, .driver = { .name = "samsung-spdif", .owner = THIS_MODULE, |