aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic3x.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/tlv320aic3x.c')
-rw-r--r--sound/soc/codecs/tlv320aic3x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index fc687790188b..77b8f9ae29be 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1176,7 +1176,7 @@ EXPORT_SYMBOL_GPL(aic3x_set_gpio);
1176int aic3x_get_gpio(struct snd_soc_codec *codec, int gpio) 1176int aic3x_get_gpio(struct snd_soc_codec *codec, int gpio)
1177{ 1177{
1178 u8 reg = gpio ? AIC3X_GPIO2_REG : AIC3X_GPIO1_REG; 1178 u8 reg = gpio ? AIC3X_GPIO2_REG : AIC3X_GPIO1_REG;
1179 u8 val, bit = gpio ? 2: 1; 1179 u8 val = 0, bit = gpio ? 2 : 1;
1180 1180
1181 aic3x_read(codec, reg, &val); 1181 aic3x_read(codec, reg, &val);
1182 return (val >> bit) & 1; 1182 return (val >> bit) & 1;
@@ -1204,7 +1204,7 @@ EXPORT_SYMBOL_GPL(aic3x_set_headset_detection);
1204 1204
1205int aic3x_headset_detected(struct snd_soc_codec *codec) 1205int aic3x_headset_detected(struct snd_soc_codec *codec)
1206{ 1206{
1207 u8 val; 1207 u8 val = 0;
1208 aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val); 1208 aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val);
1209 return (val >> 4) & 1; 1209 return (val >> 4) & 1;
1210} 1210}
@@ -1212,7 +1212,7 @@ EXPORT_SYMBOL_GPL(aic3x_headset_detected);
1212 1212
1213int aic3x_button_pressed(struct snd_soc_codec *codec) 1213int aic3x_button_pressed(struct snd_soc_codec *codec)
1214{ 1214{
1215 u8 val; 1215 u8 val = 0;
1216 aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val); 1216 aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val);
1217 return (val >> 5) & 1; 1217 return (val >> 5) & 1;
1218} 1218}