[6/8] ASoC: rt5665: move set_pll to codec level
diff mbox

Message ID 1488971136-19100-6-git-send-email-bardliao@realtek.com
State New
Headers show

Commit Message

Bard Liao March 8, 2017, 11:05 a.m. UTC
Move set_pll function to codec level and people can use it at both
codec and dai level.

Signed-off-by: Bard Liao <bardliao@realtek.com>
---
 sound/soc/codecs/rt5665.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Mark Brown March 8, 2017, 12:46 p.m. UTC | #1
On Wed, Mar 08, 2017 at 11:19:52AM +0000, Bard Liao wrote:

> This patch doesn't use lower case of 's'ource in the function body.
> Could we apply the first 5 patches if there is no comment?
> Or ignore the error and I will send a patch to lower case in the function
> body?

I'll skip this patch, please send a new version.

Patch
diff mbox

diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c
index ca6aa66..2db039d 100644
--- a/sound/soc/codecs/rt5665.c
+++ b/sound/soc/codecs/rt5665.c
@@ -4163,10 +4163,10 @@  static int rt5665_set_dai_sysclk(struct snd_soc_dai *dai,
 	return 0;
 }
 
-static int rt5665_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int Source,
-			unsigned int freq_in, unsigned int freq_out)
+static int rt5665_set_codec_pll(struct snd_soc_codec *codec, int pll_id,
+				int source, unsigned int freq_in,
+				unsigned int freq_out)
 {
-	struct snd_soc_codec *codec = dai->codec;
 	struct rt5665_priv *rt5665 = snd_soc_codec_get_drvdata(codec);
 	struct rl6231_pll_code pll_code;
 	int ret;
@@ -4399,7 +4399,6 @@  static const struct snd_soc_dai_ops rt5665_aif_dai_ops = {
 	.set_fmt = rt5665_set_dai_fmt,
 	.set_sysclk = rt5665_set_dai_sysclk,
 	.set_tdm_slot = rt5665_set_tdm_slot,
-	.set_pll = rt5665_set_dai_pll,
 	.set_bclk_ratio = rt5665_set_bclk_ratio,
 };
 
@@ -4508,7 +4507,8 @@  static struct snd_soc_codec_driver soc_codec_dev_rt5665 = {
 		.num_dapm_widgets = ARRAY_SIZE(rt5665_dapm_widgets),
 		.dapm_routes = rt5665_dapm_routes,
 		.num_dapm_routes = ARRAY_SIZE(rt5665_dapm_routes),
-	}
+	},
+	.set_pll = rt5665_set_codec_pll,
 };