ASoC: fsl: imx-audmux: Use devm_clk_get()
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 12 Mar 2013 23:51:28 +0000 (20:51 -0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 13 Mar 2013 10:39:31 +0000 (10:39 +0000)
By using devm_clk_get() we can save a call to clk_put().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/fsl/imx-audmux.c

index 3f333e5b4673c4174355ab05cc2b1b5ea83c77a0..47f046a8fdab8240d7e47756e532151aabee969d 100644 (file)
@@ -262,7 +262,7 @@ static int imx_audmux_probe(struct platform_device *pdev)
                return PTR_ERR(pinctrl);
        }
 
-       audmux_clk = clk_get(&pdev->dev, "audmux");
+       audmux_clk = devm_clk_get(&pdev->dev, "audmux");
        if (IS_ERR(audmux_clk)) {
                dev_dbg(&pdev->dev, "cannot get clock: %ld\n",
                                PTR_ERR(audmux_clk));
@@ -282,7 +282,6 @@ static int imx_audmux_remove(struct platform_device *pdev)
 {
        if (audmux_type == IMX31_AUDMUX)
                audmux_debugfs_remove();
-       clk_put(audmux_clk);
 
        return 0;
 }