diff mbox

[1/2] ASoC: samsung-ac97: Use devm_clk_get()

Message ID 1372239463-14603-1-git-send-email-broonie@linaro.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Mark Brown June 26, 2013, 9:37 a.m. UTC
Signed-off-by: Mark Brown <broonie@linaro.org>
---
 sound/soc/samsung/ac97.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Jingoo Han June 26, 2013, 9:45 a.m. UTC | #1
On Wednesday, June 26, 2013 6:38 PM, Mark Brown wrote:
> 
> Signed-off-by: Mark Brown <broonie@linaro.org>

It looks good.

Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> ---
>  sound/soc/samsung/ac97.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
> index cb88ead..1c85999 100644
> --- a/sound/soc/samsung/ac97.c
> +++ b/sound/soc/samsung/ac97.c
> @@ -440,7 +440,7 @@ static int s3c_ac97_probe(struct platform_device *pdev)
>  		goto err1;
>  	}
> 
> -	s3c_ac97.ac97_clk = clk_get(&pdev->dev, "ac97");
> +	s3c_ac97.ac97_clk = devm_clk_get(&pdev->dev, "ac97");
>  	if (IS_ERR(s3c_ac97.ac97_clk)) {
>  		dev_err(&pdev->dev, "ac97 failed to get ac97_clock\n");
>  		ret = -ENODEV;
> @@ -480,7 +480,6 @@ err5:
>  err4:
>  err3:
>  	clk_disable_unprepare(s3c_ac97.ac97_clk);
> -	clk_put(s3c_ac97.ac97_clk);
>  err2:
>  	iounmap(s3c_ac97.regs);
>  err1:
> @@ -501,7 +500,6 @@ static int s3c_ac97_remove(struct platform_device *pdev)
>  		free_irq(irq_res->start, NULL);
> 
>  	clk_disable_unprepare(s3c_ac97.ac97_clk);
> -	clk_put(s3c_ac97.ac97_clk);
> 
>  	iounmap(s3c_ac97.regs);
> 
> --
> 1.8.3.1
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
index cb88ead..1c85999 100644
--- a/sound/soc/samsung/ac97.c
+++ b/sound/soc/samsung/ac97.c
@@ -440,7 +440,7 @@  static int s3c_ac97_probe(struct platform_device *pdev)
 		goto err1;
 	}
 
-	s3c_ac97.ac97_clk = clk_get(&pdev->dev, "ac97");
+	s3c_ac97.ac97_clk = devm_clk_get(&pdev->dev, "ac97");
 	if (IS_ERR(s3c_ac97.ac97_clk)) {
 		dev_err(&pdev->dev, "ac97 failed to get ac97_clock\n");
 		ret = -ENODEV;
@@ -480,7 +480,6 @@  err5:
 err4:
 err3:
 	clk_disable_unprepare(s3c_ac97.ac97_clk);
-	clk_put(s3c_ac97.ac97_clk);
 err2:
 	iounmap(s3c_ac97.regs);
 err1:
@@ -501,7 +500,6 @@  static int s3c_ac97_remove(struct platform_device *pdev)
 		free_irq(irq_res->start, NULL);
 
 	clk_disable_unprepare(s3c_ac97.ac97_clk);
-	clk_put(s3c_ac97.ac97_clk);
 
 	iounmap(s3c_ac97.regs);