diff options
37 files changed, 123 insertions, 68 deletions
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index 5c51f367c061..add8a1b8bcf0 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h | |||
@@ -29,7 +29,7 @@ struct wm8994_ldo_pdata { | |||
29 | #define WM8994_CONFIGURE_GPIO 0x8000 | 29 | #define WM8994_CONFIGURE_GPIO 0x8000 |
30 | 30 | ||
31 | #define WM8994_DRC_REGS 5 | 31 | #define WM8994_DRC_REGS 5 |
32 | #define WM8994_EQ_REGS 19 | 32 | #define WM8994_EQ_REGS 20 |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * DRC configurations are specified with a label and a set of register | 35 | * DRC configurations are specified with a label and a set of register |
diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index 293569dfd0ed..e521ada80542 100644 --- a/sound/soc/atmel/sam9g20_wm8731.c +++ b/sound/soc/atmel/sam9g20_wm8731.c | |||
@@ -222,9 +222,9 @@ static int __init at91sam9g20ek_init(void) | |||
222 | } | 222 | } |
223 | 223 | ||
224 | pllb = clk_get(NULL, "pllb"); | 224 | pllb = clk_get(NULL, "pllb"); |
225 | if (IS_ERR(mclk)) { | 225 | if (IS_ERR(pllb)) { |
226 | printk(KERN_ERR "ASoC: Failed to get PLLB\n"); | 226 | printk(KERN_ERR "ASoC: Failed to get PLLB\n"); |
227 | ret = PTR_ERR(mclk); | 227 | ret = PTR_ERR(pllb); |
228 | goto err_mclk; | 228 | goto err_mclk; |
229 | } | 229 | } |
230 | ret = clk_set_parent(mclk, pllb); | 230 | ret = clk_set_parent(mclk, pllb); |
@@ -240,6 +240,7 @@ static int __init at91sam9g20ek_init(void) | |||
240 | if (!at91sam9g20ek_snd_device) { | 240 | if (!at91sam9g20ek_snd_device) { |
241 | printk(KERN_ERR "ASoC: Platform device allocation failed\n"); | 241 | printk(KERN_ERR "ASoC: Platform device allocation failed\n"); |
242 | ret = -ENOMEM; | 242 | ret = -ENOMEM; |
243 | goto err_mclk; | ||
243 | } | 244 | } |
244 | 245 | ||
245 | platform_set_drvdata(at91sam9g20ek_snd_device, | 246 | platform_set_drvdata(at91sam9g20ek_snd_device, |
@@ -248,11 +249,13 @@ static int __init at91sam9g20ek_init(void) | |||
248 | ret = platform_device_add(at91sam9g20ek_snd_device); | 249 | ret = platform_device_add(at91sam9g20ek_snd_device); |
249 | if (ret) { | 250 | if (ret) { |
250 | printk(KERN_ERR "ASoC: Platform device allocation failed\n"); | 251 | printk(KERN_ERR "ASoC: Platform device allocation failed\n"); |
251 | platform_device_put(at91sam9g20ek_snd_device); | 252 | goto err_device_add; |
252 | } | 253 | } |
253 | 254 | ||
254 | return ret; | 255 | return ret; |
255 | 256 | ||
257 | err_device_add: | ||
258 | platform_device_put(at91sam9g20ek_snd_device); | ||
256 | err_mclk: | 259 | err_mclk: |
257 | clk_put(mclk); | 260 | clk_put(mclk); |
258 | mclk = NULL; | 261 | mclk = NULL; |
diff --git a/sound/soc/atmel/snd-soc-afeb9260.c b/sound/soc/atmel/snd-soc-afeb9260.c index e3d283561c19..86e0f8586dc3 100644 --- a/sound/soc/atmel/snd-soc-afeb9260.c +++ b/sound/soc/atmel/snd-soc-afeb9260.c | |||
@@ -167,7 +167,6 @@ static int __init afeb9260_soc_init(void) | |||
167 | 167 | ||
168 | return 0; | 168 | return 0; |
169 | err1: | 169 | err1: |
170 | platform_device_del(afeb9260_snd_device); | ||
171 | platform_device_put(afeb9260_snd_device); | 170 | platform_device_put(afeb9260_snd_device); |
172 | return err; | 171 | return err; |
173 | } | 172 | } |
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index 470cb93b1d1f..d63e28773eb1 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c | |||
@@ -2019,7 +2019,10 @@ err_access: | |||
2019 | 2019 | ||
2020 | static int max98088_remove(struct snd_soc_codec *codec) | 2020 | static int max98088_remove(struct snd_soc_codec *codec) |
2021 | { | 2021 | { |
2022 | struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); | ||
2023 | |||
2022 | max98088_set_bias_level(codec, SND_SOC_BIAS_OFF); | 2024 | max98088_set_bias_level(codec, SND_SOC_BIAS_OFF); |
2025 | kfree(max98088->eq_texts); | ||
2023 | 2026 | ||
2024 | return 0; | 2027 | return 0; |
2025 | } | 2028 | } |
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c index 00d67cc8e206..061f9e5a497b 100644 --- a/sound/soc/codecs/stac9766.c +++ b/sound/soc/codecs/stac9766.c | |||
@@ -383,6 +383,7 @@ static struct snd_soc_codec_driver soc_codec_dev_stac9766 = { | |||
383 | .reg_cache_size = sizeof(stac9766_reg), | 383 | .reg_cache_size = sizeof(stac9766_reg), |
384 | .reg_word_size = sizeof(u16), | 384 | .reg_word_size = sizeof(u16), |
385 | .reg_cache_step = 2, | 385 | .reg_cache_step = 2, |
386 | .reg_cache_default = stac9766_reg, | ||
386 | }; | 387 | }; |
387 | 388 | ||
388 | static __devinit int stac9766_probe(struct platform_device *pdev) | 389 | static __devinit int stac9766_probe(struct platform_device *pdev) |
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); | |||
1176 | int aic3x_get_gpio(struct snd_soc_codec *codec, int gpio) | 1176 | int 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 | ||
1205 | int aic3x_headset_detected(struct snd_soc_codec *codec) | 1205 | int 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 | ||
1213 | int aic3x_button_pressed(struct snd_soc_codec *codec) | 1213 | int 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 | } |
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index ee4fb201de60..d2c243095673 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c | |||
@@ -78,8 +78,10 @@ static int tpa6130a2_i2c_write(int reg, u8 value) | |||
78 | 78 | ||
79 | if (data->power_state) { | 79 | if (data->power_state) { |
80 | val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value); | 80 | val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value); |
81 | if (val < 0) | 81 | if (val < 0) { |
82 | dev_err(&tpa6130a2_client->dev, "Write failed\n"); | 82 | dev_err(&tpa6130a2_client->dev, "Write failed\n"); |
83 | return val; | ||
84 | } | ||
83 | } | 85 | } |
84 | 86 | ||
85 | /* Either powered on or off, we save the context */ | 87 | /* Either powered on or off, we save the context */ |
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index 712ef7c76f90..9a433a5396cb 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c | |||
@@ -146,7 +146,6 @@ static int wm8523_startup(struct snd_pcm_substream *substream, | |||
146 | return -EINVAL; | 146 | return -EINVAL; |
147 | } | 147 | } |
148 | 148 | ||
149 | return 0; | ||
150 | snd_pcm_hw_constraint_list(substream->runtime, 0, | 149 | snd_pcm_hw_constraint_list(substream->runtime, 0, |
151 | SNDRV_PCM_HW_PARAM_RATE, | 150 | SNDRV_PCM_HW_PARAM_RATE, |
152 | &wm8523->rate_constraint); | 151 | &wm8523->rate_constraint); |
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index a2e0ed59b376..879dff2714dd 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c | |||
@@ -491,16 +491,16 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream, | |||
491 | paifa |= 0x8; | 491 | paifa |= 0x8; |
492 | break; | 492 | break; |
493 | case SNDRV_PCM_FORMAT_S20_3LE: | 493 | case SNDRV_PCM_FORMAT_S20_3LE: |
494 | paifa |= 0x10; | 494 | paifa |= 0x0; |
495 | paifb |= WM8580_AIF_LENGTH_20; | 495 | paifb |= WM8580_AIF_LENGTH_20; |
496 | break; | 496 | break; |
497 | case SNDRV_PCM_FORMAT_S24_LE: | 497 | case SNDRV_PCM_FORMAT_S24_LE: |
498 | paifa |= 0x10; | 498 | paifa |= 0x0; |
499 | paifb |= WM8580_AIF_LENGTH_24; | 499 | paifb |= WM8580_AIF_LENGTH_24; |
500 | break; | 500 | break; |
501 | case SNDRV_PCM_FORMAT_S32_LE: | 501 | case SNDRV_PCM_FORMAT_S32_LE: |
502 | paifa |= 0x10; | 502 | paifa |= 0x0; |
503 | paifb |= WM8580_AIF_LENGTH_24; | 503 | paifb |= WM8580_AIF_LENGTH_32; |
504 | break; | 504 | break; |
505 | default: | 505 | default: |
506 | return -EINVAL; | 506 | return -EINVAL; |
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 631385802eb4..e725c09a3e79 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -526,7 +526,7 @@ static int wm8731_probe(struct snd_soc_codec *codec) | |||
526 | snd_soc_update_bits(codec, WM8731_RINVOL, 0x100, 0); | 526 | snd_soc_update_bits(codec, WM8731_RINVOL, 0x100, 0); |
527 | 527 | ||
528 | /* Disable bypass path by default */ | 528 | /* Disable bypass path by default */ |
529 | snd_soc_update_bits(codec, WM8731_APANA, 0x4, 0); | 529 | snd_soc_update_bits(codec, WM8731_APANA, 0x8, 0); |
530 | 530 | ||
531 | snd_soc_add_controls(codec, wm8731_snd_controls, | 531 | snd_soc_add_controls(codec, wm8731_snd_controls, |
532 | ARRAY_SIZE(wm8731_snd_controls)); | 532 | ARRAY_SIZE(wm8731_snd_controls)); |
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 33be84e506ea..fca60a0b57b8 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -2498,6 +2498,8 @@ static int wm8904_remove(struct snd_soc_codec *codec) | |||
2498 | 2498 | ||
2499 | wm8904_set_bias_level(codec, SND_SOC_BIAS_OFF); | 2499 | wm8904_set_bias_level(codec, SND_SOC_BIAS_OFF); |
2500 | regulator_bulk_free(ARRAY_SIZE(wm8904->supplies), wm8904->supplies); | 2500 | regulator_bulk_free(ARRAY_SIZE(wm8904->supplies), wm8904->supplies); |
2501 | kfree(wm8904->retune_mobile_texts); | ||
2502 | kfree(wm8904->drc_texts); | ||
2501 | 2503 | ||
2502 | return 0; | 2504 | return 0; |
2503 | } | 2505 | } |
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index 4f326f604104..8340485c9851 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c | |||
@@ -711,7 +711,7 @@ static int wm8961_hw_params(struct snd_pcm_substream *substream, | |||
711 | if (fs <= 24000) | 711 | if (fs <= 24000) |
712 | reg |= WM8961_DACSLOPE; | 712 | reg |= WM8961_DACSLOPE; |
713 | else | 713 | else |
714 | reg &= WM8961_DACSLOPE; | 714 | reg &= ~WM8961_DACSLOPE; |
715 | snd_soc_write(codec, WM8961_ADC_DAC_CONTROL_2, reg); | 715 | snd_soc_write(codec, WM8961_ADC_DAC_CONTROL_2, reg); |
716 | 716 | ||
717 | return 0; | 717 | return 0; |
@@ -736,7 +736,7 @@ static int wm8961_set_sysclk(struct snd_soc_dai *dai, int clk_id, | |||
736 | freq /= 2; | 736 | freq /= 2; |
737 | } else { | 737 | } else { |
738 | dev_dbg(codec->dev, "Using MCLK/1 for %dHz MCLK\n", freq); | 738 | dev_dbg(codec->dev, "Using MCLK/1 for %dHz MCLK\n", freq); |
739 | reg &= WM8961_MCLKDIV; | 739 | reg &= ~WM8961_MCLKDIV; |
740 | } | 740 | } |
741 | 741 | ||
742 | snd_soc_write(codec, WM8961_CLOCKING1, reg); | 742 | snd_soc_write(codec, WM8961_CLOCKING1, reg); |
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index e8092745a207..1304ca91a11c 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -3339,7 +3339,7 @@ static irqreturn_t wm8962_irq(int irq, void *data) | |||
3339 | int mask; | 3339 | int mask; |
3340 | int active; | 3340 | int active; |
3341 | 3341 | ||
3342 | mask = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2); | 3342 | mask = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2_MASK); |
3343 | 3343 | ||
3344 | active = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2); | 3344 | active = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2); |
3345 | active &= ~mask; | 3345 | active &= ~mask; |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 830dfdd66c5f..4d3e6f1ac584 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -4061,6 +4061,8 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec) | |||
4061 | wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC2_DET, wm8994); | 4061 | wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC2_DET, wm8994); |
4062 | wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_SHRT, wm8994); | 4062 | wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_SHRT, wm8994); |
4063 | wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_DET, wm8994); | 4063 | wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_DET, wm8994); |
4064 | kfree(wm8994->retune_mobile_texts); | ||
4065 | kfree(wm8994->drc_texts); | ||
4064 | kfree(wm8994); | 4066 | kfree(wm8994); |
4065 | 4067 | ||
4066 | return 0; | 4068 | return 0; |
@@ -4073,6 +4075,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8994 = { | |||
4073 | .resume = wm8994_resume, | 4075 | .resume = wm8994_resume, |
4074 | .read = wm8994_read, | 4076 | .read = wm8994_read, |
4075 | .write = wm8994_write, | 4077 | .write = wm8994_write, |
4078 | .readable_register = wm8994_readable, | ||
4079 | .volatile_register = wm8994_volatile, | ||
4076 | .set_bias_level = wm8994_set_bias_level, | 4080 | .set_bias_level = wm8994_set_bias_level, |
4077 | }; | 4081 | }; |
4078 | 4082 | ||
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 19ca782ac970..0e24092722c3 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -293,7 +293,7 @@ SOC_DOUBLE_R("Speaker Switch", | |||
293 | SOC_DOUBLE_R("Speaker ZC Switch", | 293 | SOC_DOUBLE_R("Speaker ZC Switch", |
294 | WM8993_SPEAKER_VOLUME_LEFT, WM8993_SPEAKER_VOLUME_RIGHT, | 294 | WM8993_SPEAKER_VOLUME_LEFT, WM8993_SPEAKER_VOLUME_RIGHT, |
295 | 7, 1, 0), | 295 | 7, 1, 0), |
296 | SOC_DOUBLE_TLV("Speaker Boost Volume", WM8993_SPKOUT_BOOST, 0, 3, 7, 0, | 296 | SOC_DOUBLE_TLV("Speaker Boost Volume", WM8993_SPKOUT_BOOST, 3, 0, 7, 0, |
297 | spkboost_tlv), | 297 | spkboost_tlv), |
298 | SOC_ENUM("Speaker Reference", speaker_ref), | 298 | SOC_ENUM("Speaker Reference", speaker_ref), |
299 | SOC_ENUM("Speaker Mode", speaker_mode), | 299 | SOC_ENUM("Speaker Mode", speaker_mode), |
diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c index fb4cc1edf339..9d2afccc3a2d 100644 --- a/sound/soc/davinci/davinci-vcif.c +++ b/sound/soc/davinci/davinci-vcif.c | |||
@@ -247,7 +247,10 @@ fail: | |||
247 | 247 | ||
248 | static int davinci_vcif_remove(struct platform_device *pdev) | 248 | static int davinci_vcif_remove(struct platform_device *pdev) |
249 | { | 249 | { |
250 | struct davinci_vcif_dev *davinci_vcif_dev = dev_get_drvdata(&pdev->dev); | ||
251 | |||
250 | snd_soc_unregister_dai(&pdev->dev); | 252 | snd_soc_unregister_dai(&pdev->dev); |
253 | kfree(davinci_vcif_dev); | ||
251 | 254 | ||
252 | return 0; | 255 | return 0; |
253 | } | 256 | } |
diff --git a/sound/soc/ep93xx/simone.c b/sound/soc/ep93xx/simone.c index 4b0d19913728..286817946c56 100644 --- a/sound/soc/ep93xx/simone.c +++ b/sound/soc/ep93xx/simone.c | |||
@@ -54,24 +54,26 @@ static int __init simone_init(void) | |||
54 | 54 | ||
55 | ret = platform_device_add(simone_snd_ac97_device); | 55 | ret = platform_device_add(simone_snd_ac97_device); |
56 | if (ret) | 56 | if (ret) |
57 | goto fail; | 57 | goto fail1; |
58 | 58 | ||
59 | simone_snd_device = platform_device_alloc("soc-audio", -1); | 59 | simone_snd_device = platform_device_alloc("soc-audio", -1); |
60 | if (!simone_snd_device) { | 60 | if (!simone_snd_device) { |
61 | ret = -ENOMEM; | 61 | ret = -ENOMEM; |
62 | goto fail; | 62 | goto fail2; |
63 | } | 63 | } |
64 | 64 | ||
65 | platform_set_drvdata(simone_snd_device, &snd_soc_simone); | 65 | platform_set_drvdata(simone_snd_device, &snd_soc_simone); |
66 | ret = platform_device_add(simone_snd_device); | 66 | ret = platform_device_add(simone_snd_device); |
67 | if (ret) { | 67 | if (ret) |
68 | platform_device_put(simone_snd_device); | 68 | goto fail3; |
69 | goto fail; | ||
70 | } | ||
71 | 69 | ||
72 | return ret; | 70 | return 0; |
73 | 71 | ||
74 | fail: | 72 | fail3: |
73 | platform_device_put(simone_snd_device); | ||
74 | fail2: | ||
75 | platform_device_del(simone_snd_ac97_device); | ||
76 | fail1: | ||
75 | platform_device_put(simone_snd_ac97_device); | 77 | platform_device_put(simone_snd_ac97_device); |
76 | return ret; | 78 | return ret; |
77 | } | 79 | } |
diff --git a/sound/soc/fsl/efika-audio-fabric.c b/sound/soc/fsl/efika-audio-fabric.c index 53251e6b5bd5..108b5d8bd0e9 100644 --- a/sound/soc/fsl/efika-audio-fabric.c +++ b/sound/soc/fsl/efika-audio-fabric.c | |||
@@ -76,6 +76,7 @@ static __init int efika_fabric_init(void) | |||
76 | rc = platform_device_add(pdev); | 76 | rc = platform_device_add(pdev); |
77 | if (rc) { | 77 | if (rc) { |
78 | pr_err("efika_fabric_init: platform_device_add() failed\n"); | 78 | pr_err("efika_fabric_init: platform_device_add() failed\n"); |
79 | platform_device_put(pdev); | ||
79 | return -ENODEV; | 80 | return -ENODEV; |
80 | } | 81 | } |
81 | return 0; | 82 | return 0; |
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index dce6b551cd78..f92dca07cd35 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/of_device.h> | 10 | #include <linux/of_device.h> |
11 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
12 | #include <linux/of_device.h> | ||
13 | #include <linux/of_platform.h> | 12 | #include <linux/of_platform.h> |
14 | 13 | ||
15 | #include <sound/soc.h> | 14 | #include <sound/soc.h> |
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index 0d7dcf1e4863..7d7847a1e66b 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -498,6 +498,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) | |||
498 | dev_err(&pdev->dev, "platform device add failed\n"); | 498 | dev_err(&pdev->dev, "platform device add failed\n"); |
499 | goto error; | 499 | goto error; |
500 | } | 500 | } |
501 | dev_set_drvdata(&pdev->dev, sound_device); | ||
501 | 502 | ||
502 | of_node_put(codec_np); | 503 | of_node_put(codec_np); |
503 | 504 | ||
diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c index 63b9eaa1ebc2..026b756961e0 100644 --- a/sound/soc/fsl/p1022_ds.c +++ b/sound/soc/fsl/p1022_ds.c | |||
@@ -498,6 +498,7 @@ static int p1022_ds_probe(struct platform_device *pdev) | |||
498 | dev_err(&pdev->dev, "platform device add failed\n"); | 498 | dev_err(&pdev->dev, "platform device add failed\n"); |
499 | goto error; | 499 | goto error; |
500 | } | 500 | } |
501 | dev_set_drvdata(&pdev->dev, sound_device); | ||
501 | 502 | ||
502 | of_node_put(codec_np); | 503 | of_node_put(codec_np); |
503 | 504 | ||
diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c index 25f27ec1dd6e..ba4d85e317ed 100644 --- a/sound/soc/fsl/pcm030-audio-fabric.c +++ b/sound/soc/fsl/pcm030-audio-fabric.c | |||
@@ -76,6 +76,7 @@ static __init int pcm030_fabric_init(void) | |||
76 | rc = platform_device_add(pdev); | 76 | rc = platform_device_add(pdev); |
77 | if (rc) { | 77 | if (rc) { |
78 | pr_err("pcm030_fabric_init: platform_device_add() failed\n"); | 78 | pr_err("pcm030_fabric_init: platform_device_add() failed\n"); |
79 | platform_device_put(pdev); | ||
79 | return -ENODEV; | 80 | return -ENODEV; |
80 | } | 81 | } |
81 | return 0; | 82 | return 0; |
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index d2d98c75ee8a..390b6ffc2658 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c | |||
@@ -679,8 +679,11 @@ static int imx_ssi_probe(struct platform_device *pdev) | |||
679 | } | 679 | } |
680 | 680 | ||
681 | ssi->soc_platform_pdev_fiq = platform_device_alloc("imx-fiq-pcm-audio", pdev->id); | 681 | ssi->soc_platform_pdev_fiq = platform_device_alloc("imx-fiq-pcm-audio", pdev->id); |
682 | if (!ssi->soc_platform_pdev_fiq) | 682 | if (!ssi->soc_platform_pdev_fiq) { |
683 | ret = -ENOMEM; | ||
683 | goto failed_pdev_fiq_alloc; | 684 | goto failed_pdev_fiq_alloc; |
685 | } | ||
686 | |||
684 | platform_set_drvdata(ssi->soc_platform_pdev_fiq, ssi); | 687 | platform_set_drvdata(ssi->soc_platform_pdev_fiq, ssi); |
685 | ret = platform_device_add(ssi->soc_platform_pdev_fiq); | 688 | ret = platform_device_add(ssi->soc_platform_pdev_fiq); |
686 | if (ret) { | 689 | if (ret) { |
@@ -689,8 +692,11 @@ static int imx_ssi_probe(struct platform_device *pdev) | |||
689 | } | 692 | } |
690 | 693 | ||
691 | ssi->soc_platform_pdev = platform_device_alloc("imx-pcm-audio", pdev->id); | 694 | ssi->soc_platform_pdev = platform_device_alloc("imx-pcm-audio", pdev->id); |
692 | if (!ssi->soc_platform_pdev) | 695 | if (!ssi->soc_platform_pdev) { |
696 | ret = -ENOMEM; | ||
693 | goto failed_pdev_alloc; | 697 | goto failed_pdev_alloc; |
698 | } | ||
699 | |||
694 | platform_set_drvdata(ssi->soc_platform_pdev, ssi); | 700 | platform_set_drvdata(ssi->soc_platform_pdev, ssi); |
695 | ret = platform_device_add(ssi->soc_platform_pdev); | 701 | ret = platform_device_add(ssi->soc_platform_pdev); |
696 | if (ret) { | 702 | if (ret) { |
@@ -703,6 +709,7 @@ static int imx_ssi_probe(struct platform_device *pdev) | |||
703 | failed_pdev_add: | 709 | failed_pdev_add: |
704 | platform_device_put(ssi->soc_platform_pdev); | 710 | platform_device_put(ssi->soc_platform_pdev); |
705 | failed_pdev_alloc: | 711 | failed_pdev_alloc: |
712 | platform_device_del(ssi->soc_platform_pdev_fiq); | ||
706 | failed_pdev_fiq_add: | 713 | failed_pdev_fiq_add: |
707 | platform_device_put(ssi->soc_platform_pdev_fiq); | 714 | platform_device_put(ssi->soc_platform_pdev_fiq); |
708 | failed_pdev_fiq_alloc: | 715 | failed_pdev_fiq_alloc: |
@@ -726,8 +733,8 @@ static int __devexit imx_ssi_remove(struct platform_device *pdev) | |||
726 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 733 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
727 | struct imx_ssi *ssi = platform_get_drvdata(pdev); | 734 | struct imx_ssi *ssi = platform_get_drvdata(pdev); |
728 | 735 | ||
729 | platform_device_del(ssi->soc_platform_pdev); | 736 | platform_device_unregister(ssi->soc_platform_pdev); |
730 | platform_device_put(ssi->soc_platform_pdev); | 737 | platform_device_unregister(ssi->soc_platform_pdev_fiq); |
731 | 738 | ||
732 | snd_soc_unregister_dai(&pdev->dev); | 739 | snd_soc_unregister_dai(&pdev->dev); |
733 | 740 | ||
diff --git a/sound/soc/imx/phycore-ac97.c b/sound/soc/imx/phycore-ac97.c index 39f23734781a..9eabc28667e6 100644 --- a/sound/soc/imx/phycore-ac97.c +++ b/sound/soc/imx/phycore-ac97.c | |||
@@ -43,6 +43,7 @@ static struct snd_soc_card imx_phycore = { | |||
43 | .num_links = ARRAY_SIZE(imx_phycore_dai_ac97), | 43 | .num_links = ARRAY_SIZE(imx_phycore_dai_ac97), |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static struct platform_device *imx_phycore_snd_ac97_device; | ||
46 | static struct platform_device *imx_phycore_snd_device; | 47 | static struct platform_device *imx_phycore_snd_device; |
47 | 48 | ||
48 | static int __init imx_phycore_init(void) | 49 | static int __init imx_phycore_init(void) |
@@ -53,29 +54,42 @@ static int __init imx_phycore_init(void) | |||
53 | /* return happy. We might run on a totally different machine */ | 54 | /* return happy. We might run on a totally different machine */ |
54 | return 0; | 55 | return 0; |
55 | 56 | ||
56 | imx_phycore_snd_device = platform_device_alloc("soc-audio", -1); | 57 | imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1); |
57 | if (!imx_phycore_snd_device) | 58 | if (!imx_phycore_snd_ac97_device) |
58 | return -ENOMEM; | 59 | return -ENOMEM; |
59 | 60 | ||
60 | platform_set_drvdata(imx_phycore_snd_device, &imx_phycore); | 61 | platform_set_drvdata(imx_phycore_snd_ac97_device, &imx_phycore); |
61 | ret = platform_device_add(imx_phycore_snd_device); | 62 | ret = platform_device_add(imx_phycore_snd_ac97_device); |
63 | if (ret) | ||
64 | goto fail1; | ||
62 | 65 | ||
63 | imx_phycore_snd_device = platform_device_alloc("wm9712-codec", -1); | 66 | imx_phycore_snd_device = platform_device_alloc("wm9712-codec", -1); |
64 | if (!imx_phycore_snd_device) | 67 | if (!imx_phycore_snd_device) { |
65 | return -ENOMEM; | 68 | ret = -ENOMEM; |
69 | goto fail2; | ||
70 | } | ||
66 | ret = platform_device_add(imx_phycore_snd_device); | 71 | ret = platform_device_add(imx_phycore_snd_device); |
67 | 72 | ||
68 | if (ret) { | 73 | if (ret) { |
69 | printk(KERN_ERR "ASoC: Platform device allocation failed\n"); | 74 | printk(KERN_ERR "ASoC: Platform device allocation failed\n"); |
70 | platform_device_put(imx_phycore_snd_device); | 75 | goto fail3; |
71 | } | 76 | } |
72 | 77 | ||
78 | return 0; | ||
79 | |||
80 | fail3: | ||
81 | platform_device_put(imx_phycore_snd_device); | ||
82 | fail2: | ||
83 | platform_device_del(imx_phycore_snd_ac97_device); | ||
84 | fail1: | ||
85 | platform_device_put(imx_phycore_snd_ac97_device); | ||
73 | return ret; | 86 | return ret; |
74 | } | 87 | } |
75 | 88 | ||
76 | static void __exit imx_phycore_exit(void) | 89 | static void __exit imx_phycore_exit(void) |
77 | { | 90 | { |
78 | platform_device_unregister(imx_phycore_snd_device); | 91 | platform_device_unregister(imx_phycore_snd_device); |
92 | platform_device_unregister(imx_phycore_snd_ac97_device); | ||
79 | } | 93 | } |
80 | 94 | ||
81 | late_initcall(imx_phycore_init); | 95 | late_initcall(imx_phycore_init); |
diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c index 293dc748797c..dac6732da969 100644 --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c | |||
@@ -49,7 +49,7 @@ static unsigned short nuc900_ac97_read(struct snd_ac97 *ac97, | |||
49 | mutex_lock(&ac97_mutex); | 49 | mutex_lock(&ac97_mutex); |
50 | 50 | ||
51 | val = nuc900_checkready(); | 51 | val = nuc900_checkready(); |
52 | if (!!val) { | 52 | if (val) { |
53 | dev_err(nuc900_audio->dev, "AC97 codec is not ready\n"); | 53 | dev_err(nuc900_audio->dev, "AC97 codec is not ready\n"); |
54 | goto out; | 54 | goto out; |
55 | } | 55 | } |
@@ -102,7 +102,7 @@ static void nuc900_ac97_write(struct snd_ac97 *ac97, unsigned short reg, | |||
102 | mutex_lock(&ac97_mutex); | 102 | mutex_lock(&ac97_mutex); |
103 | 103 | ||
104 | tmp = nuc900_checkready(); | 104 | tmp = nuc900_checkready(); |
105 | if (!!tmp) | 105 | if (tmp) |
106 | dev_err(nuc900_audio->dev, "AC97 codec is not ready\n"); | 106 | dev_err(nuc900_audio->dev, "AC97 codec is not ready\n"); |
107 | 107 | ||
108 | /* clear the R_WB bit and write register index */ | 108 | /* clear the R_WB bit and write register index */ |
@@ -149,7 +149,7 @@ static void nuc900_ac97_warm_reset(struct snd_ac97 *ac97) | |||
149 | udelay(100); | 149 | udelay(100); |
150 | 150 | ||
151 | val = nuc900_checkready(); | 151 | val = nuc900_checkready(); |
152 | if (!!val) | 152 | if (val) |
153 | dev_err(nuc900_audio->dev, "AC97 codec is not ready\n"); | 153 | dev_err(nuc900_audio->dev, "AC97 codec is not ready\n"); |
154 | 154 | ||
155 | mutex_unlock(&ac97_mutex); | 155 | mutex_unlock(&ac97_mutex); |
@@ -263,8 +263,7 @@ static int nuc900_ac97_trigger(struct snd_pcm_substream *substream, | |||
263 | return ret; | 263 | return ret; |
264 | } | 264 | } |
265 | 265 | ||
266 | static int nuc900_ac97_probe(struct platform_device *pdev, | 266 | static int nuc900_ac97_probe(struct snd_soc_dai *dai) |
267 | struct snd_soc_dai *dai) | ||
268 | { | 267 | { |
269 | struct nuc900_audio *nuc900_audio = nuc900_ac97_data; | 268 | struct nuc900_audio *nuc900_audio = nuc900_ac97_data; |
270 | unsigned long val; | 269 | unsigned long val; |
@@ -284,12 +283,12 @@ static int nuc900_ac97_probe(struct platform_device *pdev, | |||
284 | return 0; | 283 | return 0; |
285 | } | 284 | } |
286 | 285 | ||
287 | static void nuc900_ac97_remove(struct platform_device *pdev, | 286 | static int nuc900_ac97_remove(struct snd_soc_dai *dai) |
288 | struct snd_soc_dai *dai) | ||
289 | { | 287 | { |
290 | struct nuc900_audio *nuc900_audio = nuc900_ac97_data; | 288 | struct nuc900_audio *nuc900_audio = nuc900_ac97_data; |
291 | 289 | ||
292 | clk_disable(nuc900_audio->clk); | 290 | clk_disable(nuc900_audio->clk); |
291 | return 0; | ||
293 | } | 292 | } |
294 | 293 | ||
295 | static struct snd_soc_dai_ops nuc900_ac97_dai_ops = { | 294 | static struct snd_soc_dai_ops nuc900_ac97_dai_ops = { |
@@ -313,7 +312,7 @@ static struct snd_soc_dai_driver nuc900_ac97_dai = { | |||
313 | .channels_max = 2, | 312 | .channels_max = 2, |
314 | }, | 313 | }, |
315 | .ops = &nuc900_ac97_dai_ops, | 314 | .ops = &nuc900_ac97_dai_ops, |
316 | } | 315 | }; |
317 | 316 | ||
318 | static int __devinit nuc900_ac97_drvprobe(struct platform_device *pdev) | 317 | static int __devinit nuc900_ac97_drvprobe(struct platform_device *pdev) |
319 | { | 318 | { |
@@ -384,7 +383,6 @@ out0: | |||
384 | 383 | ||
385 | static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev) | 384 | static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev) |
386 | { | 385 | { |
387 | |||
388 | snd_soc_unregister_dai(&pdev->dev); | 386 | snd_soc_unregister_dai(&pdev->dev); |
389 | 387 | ||
390 | clk_put(nuc900_ac97_data->clk); | 388 | clk_put(nuc900_ac97_data->clk); |
@@ -392,6 +390,7 @@ static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev) | |||
392 | release_mem_region(nuc900_ac97_data->res->start, | 390 | release_mem_region(nuc900_ac97_data->res->start, |
393 | resource_size(nuc900_ac97_data->res)); | 391 | resource_size(nuc900_ac97_data->res)); |
394 | 392 | ||
393 | kfree(nuc900_ac97_data); | ||
395 | nuc900_ac97_data = NULL; | 394 | nuc900_ac97_data = NULL; |
396 | 395 | ||
397 | return 0; | 396 | return 0; |
diff --git a/sound/soc/nuc900/nuc900-audio.h b/sound/soc/nuc900/nuc900-audio.h index aeed8ead2b2b..59f7e8ed1a68 100644 --- a/sound/soc/nuc900/nuc900-audio.h +++ b/sound/soc/nuc900/nuc900-audio.h | |||
@@ -110,4 +110,6 @@ struct nuc900_audio { | |||
110 | 110 | ||
111 | }; | 111 | }; |
112 | 112 | ||
113 | extern struct nuc900_audio *nuc900_ac97_data; | ||
114 | |||
113 | #endif /*end _NUC900_AUDIO_H */ | 115 | #endif /*end _NUC900_AUDIO_H */ |
diff --git a/sound/soc/nuc900/nuc900-pcm.c b/sound/soc/nuc900/nuc900-pcm.c index 195d1ac94771..8263f56dc665 100644 --- a/sound/soc/nuc900/nuc900-pcm.c +++ b/sound/soc/nuc900/nuc900-pcm.c | |||
@@ -50,12 +50,12 @@ static int nuc900_dma_hw_params(struct snd_pcm_substream *substream, | |||
50 | unsigned long flags; | 50 | unsigned long flags; |
51 | int ret = 0; | 51 | int ret = 0; |
52 | 52 | ||
53 | spin_lock_irqsave(&nuc900_audio->lock, flags); | ||
54 | |||
55 | ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); | 53 | ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); |
56 | if (ret < 0) | 54 | if (ret < 0) |
57 | return ret; | 55 | return ret; |
58 | 56 | ||
57 | spin_lock_irqsave(&nuc900_audio->lock, flags); | ||
58 | |||
59 | nuc900_audio->substream = substream; | 59 | nuc900_audio->substream = substream; |
60 | nuc900_audio->dma_addr[substream->stream] = runtime->dma_addr; | 60 | nuc900_audio->dma_addr[substream->stream] = runtime->dma_addr; |
61 | nuc900_audio->buffersize[substream->stream] = | 61 | nuc900_audio->buffersize[substream->stream] = |
@@ -169,6 +169,7 @@ static int nuc900_dma_prepare(struct snd_pcm_substream *substream) | |||
169 | struct snd_pcm_runtime *runtime = substream->runtime; | 169 | struct snd_pcm_runtime *runtime = substream->runtime; |
170 | struct nuc900_audio *nuc900_audio = runtime->private_data; | 170 | struct nuc900_audio *nuc900_audio = runtime->private_data; |
171 | unsigned long flags, val; | 171 | unsigned long flags, val; |
172 | int ret = 0; | ||
172 | 173 | ||
173 | spin_lock_irqsave(&nuc900_audio->lock, flags); | 174 | spin_lock_irqsave(&nuc900_audio->lock, flags); |
174 | 175 | ||
@@ -197,10 +198,10 @@ static int nuc900_dma_prepare(struct snd_pcm_substream *substream) | |||
197 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); | 198 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); |
198 | break; | 199 | break; |
199 | default: | 200 | default: |
200 | return -EINVAL; | 201 | ret = -EINVAL; |
201 | } | 202 | } |
202 | spin_unlock_irqrestore(&nuc900_audio->lock, flags); | 203 | spin_unlock_irqrestore(&nuc900_audio->lock, flags); |
203 | return 0; | 204 | return ret; |
204 | } | 205 | } |
205 | 206 | ||
206 | static int nuc900_dma_trigger(struct snd_pcm_substream *substream, int cmd) | 207 | static int nuc900_dma_trigger(struct snd_pcm_substream *substream, int cmd) |
@@ -332,7 +333,7 @@ static struct snd_soc_platform_driver nuc900_soc_platform = { | |||
332 | .ops = &nuc900_dma_ops, | 333 | .ops = &nuc900_dma_ops, |
333 | .pcm_new = nuc900_dma_new, | 334 | .pcm_new = nuc900_dma_new, |
334 | .pcm_free = nuc900_dma_free_dma_buffers, | 335 | .pcm_free = nuc900_dma_free_dma_buffers, |
335 | } | 336 | }; |
336 | 337 | ||
337 | static int __devinit nuc900_soc_platform_probe(struct platform_device *pdev) | 338 | static int __devinit nuc900_soc_platform_probe(struct platform_device *pdev) |
338 | { | 339 | { |
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig index d542ea2ff6be..a088db6d5091 100644 --- a/sound/soc/omap/Kconfig +++ b/sound/soc/omap/Kconfig | |||
@@ -12,8 +12,8 @@ config SND_OMAP_SOC_MCPDM | |||
12 | config SND_OMAP_SOC_N810 | 12 | config SND_OMAP_SOC_N810 |
13 | tristate "SoC Audio support for Nokia N810" | 13 | tristate "SoC Audio support for Nokia N810" |
14 | depends on SND_OMAP_SOC && MACH_NOKIA_N810 && I2C | 14 | depends on SND_OMAP_SOC && MACH_NOKIA_N810 && I2C |
15 | depends on OMAP_MUX | ||
15 | select SND_OMAP_SOC_MCBSP | 16 | select SND_OMAP_SOC_MCBSP |
16 | select OMAP_MUX | ||
17 | select SND_SOC_TLV320AIC3X | 17 | select SND_SOC_TLV320AIC3X |
18 | help | 18 | help |
19 | Say Y if you want to add support for SoC audio on Nokia N810. | 19 | Say Y if you want to add support for SoC audio on Nokia N810. |
diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c index dbd9d96b5f92..4ee33ce2cb98 100644 --- a/sound/soc/omap/omap3pandora.c +++ b/sound/soc/omap/omap3pandora.c | |||
@@ -306,6 +306,7 @@ static int __init omap3pandora_soc_init(void) | |||
306 | pr_err(PREFIX "Failed to get DAC regulator from %s: %ld\n", | 306 | pr_err(PREFIX "Failed to get DAC regulator from %s: %ld\n", |
307 | dev_name(&omap3pandora_snd_device->dev), | 307 | dev_name(&omap3pandora_snd_device->dev), |
308 | PTR_ERR(omap3pandora_dac_reg)); | 308 | PTR_ERR(omap3pandora_dac_reg)); |
309 | ret = PTR_ERR(omap3pandora_dac_reg); | ||
309 | goto fail3; | 310 | goto fail3; |
310 | } | 311 | } |
311 | 312 | ||
diff --git a/sound/soc/omap/osk5912.c b/sound/soc/omap/osk5912.c index f0e662556428..65ae00e976ef 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 | ||
diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig index 37f191bbfdd9..580f48571303 100644 --- a/sound/soc/pxa/Kconfig +++ b/sound/soc/pxa/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config SND_PXA2XX_SOC | 1 | config SND_PXA2XX_SOC |
2 | tristate "SoC Audio for the Intel PXA2xx chip" | 2 | tristate "SoC Audio for the Intel PXA2xx chip" |
3 | depends on ARCH_PXA | 3 | depends on ARCH_PXA |
4 | select SND_ARM | ||
4 | select SND_PXA2XX_LIB | 5 | select SND_PXA2XX_LIB |
5 | help | 6 | help |
6 | Say Y or M if you want to add support for codecs attached to | 7 | Say Y or M if you want to add support for codecs attached to |
diff --git a/sound/soc/s3c24xx/smdk_spdif.c b/sound/soc/s3c24xx/smdk_spdif.c index f31d22ad7c88..c8bd90488a87 100644 --- a/sound/soc/s3c24xx/smdk_spdif.c +++ b/sound/soc/s3c24xx/smdk_spdif.c | |||
@@ -38,7 +38,7 @@ static int set_audio_clock_heirachy(struct platform_device *pdev) | |||
38 | } | 38 | } |
39 | 39 | ||
40 | mout_epll = clk_get(NULL, "mout_epll"); | 40 | mout_epll = clk_get(NULL, "mout_epll"); |
41 | if (IS_ERR(fout_epll)) { | 41 | if (IS_ERR(mout_epll)) { |
42 | printk(KERN_WARNING "%s: Cannot find mout_epll.\n", | 42 | printk(KERN_WARNING "%s: Cannot find mout_epll.\n", |
43 | __func__); | 43 | __func__); |
44 | ret = -EINVAL; | 44 | ret = -EINVAL; |
@@ -54,7 +54,7 @@ static int set_audio_clock_heirachy(struct platform_device *pdev) | |||
54 | } | 54 | } |
55 | 55 | ||
56 | sclk_spdif = clk_get(NULL, "sclk_spdif"); | 56 | sclk_spdif = clk_get(NULL, "sclk_spdif"); |
57 | if (IS_ERR(fout_epll)) { | 57 | if (IS_ERR(sclk_spdif)) { |
58 | printk(KERN_WARNING "%s: Cannot find sclk_spdif.\n", | 58 | printk(KERN_WARNING "%s: Cannot find sclk_spdif.\n", |
59 | __func__); | 59 | __func__); |
60 | ret = -EINVAL; | 60 | ret = -EINVAL; |
diff --git a/sound/soc/s6000/s6000-i2s.c b/sound/soc/s6000/s6000-i2s.c index 8778faa174a6..3052f64b2403 100644 --- a/sound/soc/s6000/s6000-i2s.c +++ b/sound/soc/s6000/s6000-i2s.c | |||
@@ -434,7 +434,7 @@ static struct snd_soc_dai_driver s6000_i2s_dai = { | |||
434 | .rate_max = 1562500, | 434 | .rate_max = 1562500, |
435 | }, | 435 | }, |
436 | .ops = &s6000_i2s_dai_ops, | 436 | .ops = &s6000_i2s_dai_ops, |
437 | } | 437 | }; |
438 | 438 | ||
439 | static int __devinit s6000_i2s_probe(struct platform_device *pdev) | 439 | static int __devinit s6000_i2s_probe(struct platform_device *pdev) |
440 | { | 440 | { |
diff --git a/sound/soc/s6000/s6000-pcm.c b/sound/soc/s6000/s6000-pcm.c index 271fd222bf19..ab3ccaec72d2 100644 --- a/sound/soc/s6000/s6000-pcm.c +++ b/sound/soc/s6000/s6000-pcm.c | |||
@@ -473,7 +473,7 @@ static int s6000_pcm_new(struct snd_card *card, | |||
473 | } | 473 | } |
474 | 474 | ||
475 | res = request_irq(params->irq, s6000_pcm_irq, IRQF_SHARED, | 475 | res = request_irq(params->irq, s6000_pcm_irq, IRQF_SHARED, |
476 | s6000_soc_platform.name, pcm); | 476 | "s6000-audio", pcm); |
477 | if (res) { | 477 | if (res) { |
478 | printk(KERN_ERR "s6000-pcm couldn't get IRQ\n"); | 478 | printk(KERN_ERR "s6000-pcm couldn't get IRQ\n"); |
479 | return res; | 479 | return res; |
diff --git a/sound/soc/s6000/s6105-ipcam.c b/sound/soc/s6000/s6105-ipcam.c index 96c05e137538..c1244c5bc730 100644 --- a/sound/soc/s6000/s6105-ipcam.c +++ b/sound/soc/s6000/s6105-ipcam.c | |||
@@ -167,7 +167,7 @@ static int s6105_aic3x_init(struct snd_soc_pcm_runtime *rtd) | |||
167 | 167 | ||
168 | snd_soc_dapm_sync(codec); | 168 | snd_soc_dapm_sync(codec); |
169 | 169 | ||
170 | snd_ctl_add(codec->snd_card, snd_ctl_new1(&audio_out_mux, codec)); | 170 | snd_ctl_add(codec->card->snd_card, snd_ctl_new1(&audio_out_mux, codec)); |
171 | 171 | ||
172 | return 0; | 172 | return 0; |
173 | } | 173 | } |
diff --git a/sound/soc/sh/ssi.c b/sound/soc/sh/ssi.c index 40bbdf1591dc..05192d97b377 100644 --- a/sound/soc/sh/ssi.c +++ b/sound/soc/sh/ssi.c | |||
@@ -387,7 +387,7 @@ static int __devinit sh4_soc_dai_probe(struct platform_device *pdev) | |||
387 | 387 | ||
388 | static int __devexit sh4_soc_dai_remove(struct platform_device *pdev) | 388 | static int __devexit sh4_soc_dai_remove(struct platform_device *pdev) |
389 | { | 389 | { |
390 | snd_soc_unregister_dai(&pdev->dev, ARRAY_SIZE(sh4_ssi_dai)); | 390 | snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(sh4_ssi_dai)); |
391 | return 0; | 391 | return 0; |
392 | } | 392 | } |
393 | 393 | ||
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 441285ade024..85b7d548f167 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1619,12 +1619,14 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) | |||
1619 | #ifdef CONFIG_SND_SOC_AC97_BUS | 1619 | #ifdef CONFIG_SND_SOC_AC97_BUS |
1620 | /* register any AC97 codecs */ | 1620 | /* register any AC97 codecs */ |
1621 | for (i = 0; i < card->num_rtd; i++) { | 1621 | for (i = 0; i < card->num_rtd; i++) { |
1622 | ret = soc_register_ac97_dai_link(&card->rtd[i]); | 1622 | ret = soc_register_ac97_dai_link(&card->rtd[i]); |
1623 | if (ret < 0) { | 1623 | if (ret < 0) { |
1624 | printk(KERN_ERR "asoc: failed to register AC97 %s\n", card->name); | 1624 | printk(KERN_ERR "asoc: failed to register AC97 %s\n", card->name); |
1625 | goto probe_dai_err; | 1625 | while (--i >= 0) |
1626 | } | 1626 | soc_unregister_ac97_dai_link(&card->rtd[i]); |
1627 | goto probe_dai_err; | ||
1627 | } | 1628 | } |
1629 | } | ||
1628 | #endif | 1630 | #endif |
1629 | 1631 | ||
1630 | card->instantiated = 1; | 1632 | card->instantiated = 1; |
@@ -3072,7 +3074,9 @@ int snd_soc_register_dais(struct device *dev, | |||
3072 | pr_debug("Registered DAI '%s'\n", dai->name); | 3074 | pr_debug("Registered DAI '%s'\n", dai->name); |
3073 | } | 3075 | } |
3074 | 3076 | ||
3077 | mutex_lock(&client_mutex); | ||
3075 | snd_soc_instantiate_cards(); | 3078 | snd_soc_instantiate_cards(); |
3079 | mutex_unlock(&client_mutex); | ||
3076 | return 0; | 3080 | return 0; |
3077 | 3081 | ||
3078 | err: | 3082 | err: |