diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2012-10-22 14:32:04 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-10-22 14:28:17 +0100 |
commit | fe36a0b2b55c66f25407cc1f713b631bf7da75fa (patch) | |
tree | 76f65c9e0fe522c04fa8570a3a34752f8e3936d5 /sound/soc/ux500 | |
parent | 6f0c0580b70c89094b3422ba81118c7b959c7556 (diff) | |
download | linux-fe36a0b2b55c66f25407cc1f713b631bf7da75fa.tar.gz linux-fe36a0b2b55c66f25407cc1f713b631bf7da75fa.tar.bz2 linux-fe36a0b2b55c66f25407cc1f713b631bf7da75fa.zip |
ASoC: Ux500: Fixup use of clocks
Make sure clocks are being prepared and unprepared as well
as enabled and disabled.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/ux500')
-rw-r--r-- | sound/soc/ux500/ux500_msp_dai.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c index be94bf9bf94f..e11187fb433f 100644 --- a/sound/soc/ux500/ux500_msp_dai.c +++ b/sound/soc/ux500/ux500_msp_dai.c @@ -398,11 +398,13 @@ static int ux500_msp_dai_startup(struct snd_pcm_substream *substream, return ret; } - /* Enable clock */ + /* Prepare and enable clock */ dev_dbg(dai->dev, "%s: Enabling MSP-clock.\n", __func__); - clk_enable(drvdata->clk); + ret = clk_prepare_enable(drvdata->clk); + if (ret) + regulator_disable(drvdata->reg_vape); - return 0; + return ret; } static void ux500_msp_dai_shutdown(struct snd_pcm_substream *substream, @@ -428,8 +430,8 @@ static void ux500_msp_dai_shutdown(struct snd_pcm_substream *substream, __func__, dai->id, snd_pcm_stream_str(substream)); } - /* Disable clock */ - clk_disable(drvdata->clk); + /* Disable and unprepare clock */ + clk_disable_unprepare(drvdata->clk); /* Disable regulator */ ret = regulator_disable(drvdata->reg_vape); |