Skip to content

Commit

Permalink
ASoC: fsl: imx-audmux: Use devm_clk_get()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Mar 13, 2013
1 parent c1963c3 commit 127c5ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/fsl/imx-audmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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;
}
Expand Down

0 comments on commit 127c5ca

Please sign in to comment.