ASoC: mmp-sspa: Prepare/unprepare the clocks

The driver enables the clocks without preparing them and disables
without unpreparing afterwards. Fix that.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Link: https://lore.kernel.org/r/20200511210134.1224532-8-lkundrak@v3.sk
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Lubomir Rintel 2020-05-11 23:01:30 +02:00 committed by Mark Brown
parent 3c4e89df3b
commit 8ecdcac879
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 6 additions and 6 deletions

View File

@ -92,8 +92,8 @@ static int mmp_sspa_startup(struct snd_pcm_substream *substream,
{
struct sspa_priv *sspa = snd_soc_dai_get_drvdata(dai);
clk_enable(sspa->sysclk);
clk_enable(sspa->clk);
clk_prepare_enable(sspa->sysclk);
clk_prepare_enable(sspa->clk);
return 0;
}
@ -103,8 +103,8 @@ static void mmp_sspa_shutdown(struct snd_pcm_substream *substream,
{
struct sspa_priv *sspa = snd_soc_dai_get_drvdata(dai);
clk_disable(sspa->clk);
clk_disable(sspa->sysclk);
clk_disable_unprepare(sspa->clk);
clk_disable_unprepare(sspa->sysclk);
}
@ -458,7 +458,7 @@ static int asoc_mmp_sspa_probe(struct platform_device *pdev)
clk_put(sspa->audio_clk);
return PTR_ERR(sspa->sysclk);
}
clk_enable(sspa->audio_clk);
clk_prepare_enable(sspa->audio_clk);
sspa->dai_fmt = (unsigned int) -1;
platform_set_drvdata(pdev, sspa);
@ -485,7 +485,7 @@ static int asoc_mmp_sspa_remove(struct platform_device *pdev)
{
struct sspa_priv *sspa = platform_get_drvdata(pdev);
clk_disable(sspa->audio_clk);
clk_disable_unprepare(sspa->audio_clk);
clk_put(sspa->audio_clk);
clk_put(sspa->sysclk);
return 0;