diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-25 16:16:52 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-25 16:16:52 -0500 |
commit | fdc1f5d0608faa9bb06c1e7c662831550b32d2d3 (patch) | |
tree | 322b20dad4c7e7d3aa95484a78523651b0721c7e | |
parent | 77c667d1365e19c2848d37bf408e2f0b086b63d9 (diff) | |
parent | 25436180ee8bed6740f29d92c2030c759885c147 (diff) |
Merge branch 'for-2.6.37' into for-2.6.38
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 6 | ||||
-rw-r--r-- | sound/soc/omap/osk5912.c | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index bfd036a2c83c..fc5abdf0bcb0 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -1180,7 +1180,7 @@ EXPORT_SYMBOL_GPL(aic3x_set_gpio); | |||
1180 | int aic3x_get_gpio(struct snd_soc_codec *codec, int gpio) | 1180 | int aic3x_get_gpio(struct snd_soc_codec *codec, int gpio) |
1181 | { | 1181 | { |
1182 | u8 reg = gpio ? AIC3X_GPIO2_REG : AIC3X_GPIO1_REG; | 1182 | u8 reg = gpio ? AIC3X_GPIO2_REG : AIC3X_GPIO1_REG; |
1183 | u8 val, bit = gpio ? 2: 1; | 1183 | u8 val = 0, bit = gpio ? 2 : 1; |
1184 | 1184 | ||
1185 | aic3x_read(codec, reg, &val); | 1185 | aic3x_read(codec, reg, &val); |
1186 | return (val >> bit) & 1; | 1186 | return (val >> bit) & 1; |
@@ -1208,7 +1208,7 @@ EXPORT_SYMBOL_GPL(aic3x_set_headset_detection); | |||
1208 | 1208 | ||
1209 | int aic3x_headset_detected(struct snd_soc_codec *codec) | 1209 | int aic3x_headset_detected(struct snd_soc_codec *codec) |
1210 | { | 1210 | { |
1211 | u8 val; | 1211 | u8 val = 0; |
1212 | aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val); | 1212 | aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val); |
1213 | return (val >> 4) & 1; | 1213 | return (val >> 4) & 1; |
1214 | } | 1214 | } |
@@ -1216,7 +1216,7 @@ EXPORT_SYMBOL_GPL(aic3x_headset_detected); | |||
1216 | 1216 | ||
1217 | int aic3x_button_pressed(struct snd_soc_codec *codec) | 1217 | int aic3x_button_pressed(struct snd_soc_codec *codec) |
1218 | { | 1218 | { |
1219 | u8 val; | 1219 | u8 val = 0; |
1220 | aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val); | 1220 | aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val); |
1221 | return (val >> 5) & 1; | 1221 | return (val >> 5) & 1; |
1222 | } | 1222 | } |
diff --git a/sound/soc/omap/osk5912.c b/sound/soc/omap/osk5912.c index 18d053d2ba8c..7e75e775fb4a 100644 --- a/sound/soc/omap/osk5912.c +++ b/sound/soc/omap/osk5912.c | |||
@@ -177,7 +177,8 @@ static int __init osk_soc_init(void) | |||
177 | tlv320aic23_mclk = clk_get(dev, "mclk"); | 177 | tlv320aic23_mclk = clk_get(dev, "mclk"); |
178 | if (IS_ERR(tlv320aic23_mclk)) { | 178 | if (IS_ERR(tlv320aic23_mclk)) { |
179 | printk(KERN_ERR "Could not get mclk clock\n"); | 179 | printk(KERN_ERR "Could not get mclk clock\n"); |
180 | return -ENODEV; | 180 | err = PTR_ERR(tlv320aic23_mclk); |
181 | goto err2; | ||
181 | } | 182 | } |
182 | 183 | ||
183 | /* | 184 | /* |
@@ -188,7 +189,7 @@ static int __init osk_soc_init(void) | |||
188 | if (clk_set_rate(tlv320aic23_mclk, CODEC_CLOCK)) { | 189 | if (clk_set_rate(tlv320aic23_mclk, CODEC_CLOCK)) { |
189 | printk(KERN_ERR "Cannot set MCLK for AIC23 CODEC\n"); | 190 | printk(KERN_ERR "Cannot set MCLK for AIC23 CODEC\n"); |
190 | err = -ECANCELED; | 191 | err = -ECANCELED; |
191 | goto err1; | 192 | goto err3; |
192 | } | 193 | } |
193 | } | 194 | } |
194 | 195 | ||
@@ -196,9 +197,12 @@ static int __init osk_soc_init(void) | |||
196 | (uint) clk_get_rate(tlv320aic23_mclk), CODEC_CLOCK); | 197 | (uint) clk_get_rate(tlv320aic23_mclk), CODEC_CLOCK); |
197 | 198 | ||
198 | return 0; | 199 | return 0; |
199 | err1: | 200 | |
201 | err3: | ||
200 | clk_put(tlv320aic23_mclk); | 202 | clk_put(tlv320aic23_mclk); |
203 | err2: | ||
201 | platform_device_del(osk_snd_device); | 204 | platform_device_del(osk_snd_device); |
205 | err1: | ||
202 | platform_device_put(osk_snd_device); | 206 | platform_device_put(osk_snd_device); |
203 | 207 | ||
204 | return err; | 208 | return err; |
@@ -207,6 +211,7 @@ err1: | |||
207 | 211 | ||
208 | static void __exit osk_soc_exit(void) | 212 | static void __exit osk_soc_exit(void) |
209 | { | 213 | { |
214 | clk_put(tlv320aic23_mclk); | ||
210 | platform_device_unregister(osk_snd_device); | 215 | platform_device_unregister(osk_snd_device); |
211 | } | 216 | } |
212 | 217 | ||