[alsa-devel] [PATCH 2/2] ASoC: fsl: imx-audmux: Use devm_clk_get()

Fabio Estevam festevam at gmail.com
Wed Mar 13 00:51:28 CET 2013


From: Fabio Estevam <fabio.estevam at freescale.com>

By using devm_clk_get() we can save a call to clk_put().

Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
 sound/soc/fsl/imx-audmux.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index 3f333e5..47f046a 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -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;
 }
-- 
1.7.9.5



More information about the Alsa-devel mailing list