ASoC: tegra20-ac97: Convert to devm_clk_get()
authorMark Brown <broonie@linaro.org>
Wed, 26 Jun 2013 11:16:50 +0000 (12:16 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 27 Jun 2013 08:44:59 +0000 (09:44 +0100)
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/tegra/tegra20_ac97.c

index 2f70ea7f6618ae04dc8f125925638d4e9f90c147..d8c142dc93e406359b6cd7e4bef49d7e40d7a1b1 100644 (file)
@@ -327,7 +327,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
        }
        dev_set_drvdata(&pdev->dev, ac97);
 
-       ac97->clk_ac97 = clk_get(&pdev->dev, NULL);
+       ac97->clk_ac97 = devm_clk_get(&pdev->dev, NULL);
        if (IS_ERR(ac97->clk_ac97)) {
                dev_err(&pdev->dev, "Can't retrieve ac97 clock\n");
                ret = PTR_ERR(ac97->clk_ac97);
@@ -443,7 +443,6 @@ err_unregister_pcm:
 err_unregister_component:
        snd_soc_unregister_component(&pdev->dev);
 err_clk_put:
-       clk_put(ac97->clk_ac97);
 err:
        return ret;
 }
@@ -458,7 +457,6 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev)
        tegra_asoc_utils_fini(&ac97->util_data);
 
        clk_disable_unprepare(ac97->clk_ac97);
-       clk_put(ac97->clk_ac97);
 
        return 0;
 }