Commit dc2c9eb8 authored by Thomas Abraham's avatar Thomas Abraham Committed by Mark Brown

ASoC: SAMSUNG: pcm: use clk_prepare_enable and clk_disable_unprepare

Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.
Signed-off-by: default avatarThomas Abraham <thomas.abraham@linaro.org>
Acked-by: default avatarSangbeom Kim <sbkim73@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 98614cf6
...@@ -543,7 +543,7 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev) ...@@ -543,7 +543,7 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
ret = PTR_ERR(pcm->cclk); ret = PTR_ERR(pcm->cclk);
goto err1; goto err1;
} }
clk_enable(pcm->cclk); clk_prepare_enable(pcm->cclk);
/* record our pcm structure for later use in the callbacks */ /* record our pcm structure for later use in the callbacks */
dev_set_drvdata(&pdev->dev, pcm); dev_set_drvdata(&pdev->dev, pcm);
...@@ -568,7 +568,7 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev) ...@@ -568,7 +568,7 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
ret = -ENOENT; ret = -ENOENT;
goto err4; goto err4;
} }
clk_enable(pcm->pclk); clk_prepare_enable(pcm->pclk);
s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start
+ S3C_PCM_RXFIFO; + S3C_PCM_RXFIFO;
...@@ -592,14 +592,14 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev) ...@@ -592,14 +592,14 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
return 0; return 0;
err5: err5:
clk_disable(pcm->pclk); clk_disable_unprepare(pcm->pclk);
clk_put(pcm->pclk); clk_put(pcm->pclk);
err4: err4:
iounmap(pcm->regs); iounmap(pcm->regs);
err3: err3:
release_mem_region(mem_res->start, resource_size(mem_res)); release_mem_region(mem_res->start, resource_size(mem_res));
err2: err2:
clk_disable(pcm->cclk); clk_disable_unprepare(pcm->cclk);
clk_put(pcm->cclk); clk_put(pcm->cclk);
err1: err1:
return ret; return ret;
...@@ -619,8 +619,8 @@ static __devexit int s3c_pcm_dev_remove(struct platform_device *pdev) ...@@ -619,8 +619,8 @@ static __devexit int s3c_pcm_dev_remove(struct platform_device *pdev)
mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(mem_res->start, resource_size(mem_res)); release_mem_region(mem_res->start, resource_size(mem_res));
clk_disable(pcm->cclk); clk_disable_unprepare(pcm->cclk);
clk_disable(pcm->pclk); clk_disable_unprepare(pcm->pclk);
clk_put(pcm->pclk); clk_put(pcm->pclk);
clk_put(pcm->cclk); clk_put(pcm->cclk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment