Skip to contentSkip to conversation

ASoC: rt5645: Remove the unused variable

PATCH Applied Oder Chiou 2 participants 5 messages May 8, 2014

Subsystems (3)
lore
Share & tools
lore

Oder Chiou

author maintainer
#0 lore raw

PATCH 1/4 ASoC: rt5645: Remove the unused variable

The patch is for removing the unused variable.

---
 sound/soc/codecs/rt5645.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/codecs/rt5645.c +0 -1
index 7d8cc16..37ec468 100644
@@ -1166,7 +1166,6 @@ static int rt5645_spk_event(struct snd_soc_dapm_widget *w,
 	struct snd_kcontrol *kcontrol, int event)
 {
 	struct snd_soc_codec *codec = w->codec;
-	struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMU:
Signature · 1 line
1.8.1.1.439.g50a6b54
author maintainer
#1 lore raw

PATCH 2/4 ASoC: rt5645: Staticise non-exported symbols

The patch is for staticising non-exported symbols

---
 sound/soc/codecs/rt5645.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5645.c +3 -3
index 37ec468..9d8c7c8 100644
@@ -2248,7 +2248,7 @@ static int rt5645_resume(struct snd_soc_codec *codec)
 #define RT5645_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
 			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
 
-struct snd_soc_dai_ops rt5645_aif_dai_ops = {
+static struct snd_soc_dai_ops rt5645_aif_dai_ops = {
 	.hw_params = rt5645_hw_params,
 	.set_fmt = rt5645_set_dai_fmt,
 	.set_sysclk = rt5645_set_dai_sysclk,
@@ -2256,7 +2256,7 @@ struct snd_soc_dai_ops rt5645_aif_dai_ops = {
 	.set_pll = rt5645_set_dai_pll,
 };
 
-struct snd_soc_dai_driver rt5645_dai[] = {
+static struct snd_soc_dai_driver rt5645_dai[] = {
 	{
 		.name = "rt5645-aif1",
 		.id = RT5645_AIF1,
@@ -2459,7 +2459,7 @@ static int rt5645_i2c_remove(struct i2c_client *i2c)
 	return 0;
 }
 
-struct i2c_driver rt5645_i2c_driver = {
+static struct i2c_driver rt5645_i2c_driver = {
 	.driver = {
 		.name = "rt5645",
 		.owner = THIS_MODULE,
Signature · 1 line
1.8.1.1.439.g50a6b54
author maintainer
#2 lore raw

PATCH 3/4 ASoC: rt5645: Move settings from probe() to reg_default struct

In reply to Oder Chiou

The patch moves the private register settings from probe() to reg_default struct.

---
 sound/soc/codecs/rt5645.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5645.c +4 -4
index 9d8c7c8..4be9000 100644
@@ -50,6 +50,10 @@ static const struct regmap_range_cfg rt5645_ranges[] = {
 
 static const struct reg_default init_list[] = {
 	{RT5645_PR_BASE + 0x3d,	0x3600},
+	{RT5645_PR_BASE + 0x1c, 0xfd20);
+	{RT5645_PR_BASE + 0x20, 0x611f);
+	{RT5645_PR_BASE + 0x21, 0x4040);
+	{RT5645_PR_BASE + 0x23, 0x0004);
 };
 #define RT5645_INIT_REG_LEN ARRAY_SIZE(init_list)
 
@@ -2205,10 +2209,6 @@ static int rt5645_probe(struct snd_soc_codec *codec)
 	rt5645_set_bias_level(codec, SND_SOC_BIAS_OFF);
 
 	snd_soc_update_bits(codec, RT5645_CHARGE_PUMP, 0x0300, 0x0200);
-	snd_soc_write(codec, RT5645_PR_BASE + 0x1c, 0xfd20);
-	snd_soc_write(codec, RT5645_PR_BASE + 0x20, 0x611f);
-	snd_soc_write(codec, RT5645_PR_BASE + 0x21, 0x4040);
-	snd_soc_write(codec, RT5645_PR_BASE + 0x23, 0x0004);
 
 	return 0;
 }
Signature · 1 line
1.8.1.1.439.g50a6b54
author maintainer
#3 lore raw

PATCH 4/4 ASoC: rt5645: Correct the cache sync function

In reply to Oder Chiou

The patch corrects the cache sync function

---
 sound/soc/codecs/rt5645.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt5645.c +1 -1
index 4be9000..6db6f81 100644
@@ -2235,7 +2235,7 @@ static int rt5645_resume(struct snd_soc_codec *codec)
 	struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec);
 
 	regcache_cache_only(rt5645->regmap, false);
-	snd_soc_cache_sync(codec);
+	regcache_sync(rt5645->regmap);
 
 	return 0;
 }
Signature · 1 line
1.8.1.1.439.g50a6b54