aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-03-13 14:04:24 -0400
committerTakashi Iwai <tiwai@suse.de>2014-03-13 14:04:24 -0400
commit5418bd2f57ec6830e53b3aa8f837b00420688522 (patch)
treee641face03517aafceb55113bb3a56d0e55b250b
parentc320106230c78b37c4bdbe6eafc636169e97bad9 (diff)
parent9296f4da3bafa23d8b9abc5cd271a66ea8f90cd2 (diff)
Merge tag 'tlv320aic31xx-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Fixes for tlv320aic31xx A few fixes for issues not yet identified by the zero day tester due to the last pull request being rushed in order to clean up the problem with the git mismerge.
-rw-r--r--sound/soc/codecs/tlv320aic31xx.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index e60e37b43a1b..d3517a919776 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -129,7 +129,7 @@ static const struct regmap_range_cfg aic31xx_ranges[] = {
129 }, 129 },
130}; 130};
131 131
132struct regmap_config aic31xx_i2c_regmap = { 132static const struct regmap_config aic31xx_i2c_regmap = {
133 .reg_bits = 8, 133 .reg_bits = 8,
134 .val_bits = 8, 134 .val_bits = 8,
135 .writeable_reg = aic31xx_writeable, 135 .writeable_reg = aic31xx_writeable,
@@ -321,9 +321,9 @@ static const struct snd_kcontrol_new ldac_in_control =
321static const struct snd_kcontrol_new rdac_in_control = 321static const struct snd_kcontrol_new rdac_in_control =
322 SOC_DAPM_ENUM("DAC Right Input", rdac_in_enum); 322 SOC_DAPM_ENUM("DAC Right Input", rdac_in_enum);
323 323
324int aic31xx_wait_bits(struct aic31xx_priv *aic31xx, unsigned int reg, 324static int aic31xx_wait_bits(struct aic31xx_priv *aic31xx, unsigned int reg,
325 unsigned int mask, unsigned int wbits, int sleep, 325 unsigned int mask, unsigned int wbits, int sleep,
326 int count) 326 int count)
327{ 327{
328 unsigned int bits; 328 unsigned int bits;
329 int counter = count; 329 int counter = count;
@@ -943,7 +943,6 @@ static void aic31xx_clk_on(struct snd_soc_codec *codec)
943 943
944static void aic31xx_clk_off(struct snd_soc_codec *codec) 944static void aic31xx_clk_off(struct snd_soc_codec *codec)
945{ 945{
946 struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(codec);
947 u8 mask = AIC31XX_PM_MASK; 946 u8 mask = AIC31XX_PM_MASK;
948 u8 off = 0; 947 u8 off = 0;
949 948
@@ -1050,18 +1049,9 @@ static int aic31xx_codec_probe(struct snd_soc_codec *codec)
1050 dev_dbg(aic31xx->dev, "## %s\n", __func__); 1049 dev_dbg(aic31xx->dev, "## %s\n", __func__);
1051 1050
1052 aic31xx = snd_soc_codec_get_drvdata(codec); 1051 aic31xx = snd_soc_codec_get_drvdata(codec);
1053 codec->control_data = aic31xx->regmap;
1054 1052
1055 aic31xx->codec = codec; 1053 aic31xx->codec = codec;
1056 1054
1057 ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
1058
1059 if (ret != 0) {
1060 dev_err(codec->dev, "snd_soc_codec_set_cache_io failed %d\n",
1061 ret);
1062 return ret;
1063 }
1064
1065 for (i = 0; i < ARRAY_SIZE(aic31xx->supplies); i++) { 1055 for (i = 0; i < ARRAY_SIZE(aic31xx->supplies); i++) {
1066 aic31xx->disable_nb[i].nb.notifier_call = 1056 aic31xx->disable_nb[i].nb.notifier_call =
1067 aic31xx_regulator_event; 1057 aic31xx_regulator_event;
@@ -1187,7 +1177,7 @@ static void aic31xx_pdata_from_of(struct aic31xx_priv *aic31xx)
1187} 1177}
1188#endif /* CONFIG_OF */ 1178#endif /* CONFIG_OF */
1189 1179
1190void aic31xx_device_init(struct aic31xx_priv *aic31xx) 1180static void aic31xx_device_init(struct aic31xx_priv *aic31xx)
1191{ 1181{
1192 int ret, i; 1182 int ret, i;
1193 1183