diff options
-rw-r--r-- | sound/soc/atmel/sam9g20_wm8731.c | 9 | ||||
-rw-r--r-- | sound/soc/atmel/snd-soc-afeb9260.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/max98088.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/stac9766.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/tpa6130a2.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/wm8523.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/wm8904.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8961.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 4 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-vcif.c | 3 | ||||
-rw-r--r-- | sound/soc/ep93xx/simone.c | 18 | ||||
-rw-r--r-- | sound/soc/fsl/efika-audio-fabric.c | 1 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_dma.c | 1 | ||||
-rw-r--r-- | sound/soc/fsl/pcm030-audio-fabric.c | 1 | ||||
-rw-r--r-- | sound/soc/imx/imx-ssi.c | 15 | ||||
-rw-r--r-- | sound/soc/imx/phycore-ac97.c | 28 | ||||
-rw-r--r-- | sound/soc/nuc900/nuc900-ac97.c | 2 | ||||
-rw-r--r-- | sound/soc/omap/omap3pandora.c | 1 | ||||
-rw-r--r-- | sound/soc/omap/osk5912.c | 11 | ||||
-rw-r--r-- | sound/soc/pxa/Kconfig | 1 | ||||
-rw-r--r-- | sound/soc/s3c24xx/smdk_spdif.c | 4 | ||||
-rw-r--r-- | sound/soc/sh/ssi.c | 2 |
23 files changed, 85 insertions, 38 deletions
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/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/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/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/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..e00e39dd6576 100644 --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c | |||
@@ -384,7 +384,6 @@ out0: | |||
384 | 384 | ||
385 | static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev) | 385 | static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev) |
386 | { | 386 | { |
387 | |||
388 | snd_soc_unregister_dai(&pdev->dev); | 387 | snd_soc_unregister_dai(&pdev->dev); |
389 | 388 | ||
390 | clk_put(nuc900_ac97_data->clk); | 389 | clk_put(nuc900_ac97_data->clk); |
@@ -392,6 +391,7 @@ static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev) | |||
392 | release_mem_region(nuc900_ac97_data->res->start, | 391 | release_mem_region(nuc900_ac97_data->res->start, |
393 | resource_size(nuc900_ac97_data->res)); | 392 | resource_size(nuc900_ac97_data->res)); |
394 | 393 | ||
394 | kfree(nuc900_ac97_data); | ||
395 | nuc900_ac97_data = NULL; | 395 | nuc900_ac97_data = NULL; |
396 | 396 | ||
397 | return 0; | 397 | return 0; |
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/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 | ||