diff options
author | Shengjiu Wang <shengjiu.wang@freescale.com> | 2015-03-31 18:17:35 +0800 |
---|---|---|
committer | Frank Li <Frank.Li@freescale.com> | 2015-04-24 23:02:49 +0800 |
commit | 50c87d9db486071d42f9fe0ad405d52b7e350c4d (patch) | |
tree | 5b1fb15b0ed7c17eac2e356d9c403e52050e2ba9 /sound | |
parent | 13adc3d6d2bae4a7cb9c5da3af515b463fd23e8a (diff) |
MLK-10515-2: ASoC: fsl_mqs: Move clk get_rate to hw_param
It is too early to put clk get rate in probe, because the rate for
the clock may not be ready.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/fsl_mqs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/fsl_mqs.c b/sound/soc/codecs/fsl_mqs.c index 244f422d4898..c7555f3a8a42 100644 --- a/sound/soc/codecs/fsl_mqs.c +++ b/sound/soc/codecs/fsl_mqs.c @@ -1,7 +1,7 @@ /* * ALSA SoC IMX MQS driver * - * Copyright (C) 2014 Freescale Semiconductor, Inc. + * Copyright (C) 2014-2015 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -45,6 +45,8 @@ static int fsl_mqs_hw_params(struct snd_pcm_substream *substream, struct fsl_mqs *mqs_priv = snd_soc_codec_get_drvdata(codec); int div, res; + mqs_priv->mclk_rate = clk_get_rate(mqs_priv->mclk); + mqs_priv->bclk = snd_soc_params_to_bclk(params); mqs_priv->lrclk = params_rate(params); @@ -184,8 +186,6 @@ static int fsl_mqs_probe(struct platform_device *pdev) goto out; } - mqs_priv->mclk_rate = clk_get_rate(mqs_priv->mclk); - dev_set_drvdata(&pdev->dev, mqs_priv); return snd_soc_register_codec(&pdev->dev, &soc_codec_fsl_mqs, |