diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-17 09:18:06 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-17 09:18:06 -0400 |
commit | 8b1b054f6be2c3f94bf027ad37bc85d9ec67677f (patch) | |
tree | 92b54eaf7e6126a8b6d7544bcf972d63decd0823 /sound/soc | |
parent | 7c1c1d4a7b4ca1266057a3632d27450f5575caf9 (diff) | |
parent | 379cf39781fdb34c75bab6ac54707bc4466f3dc4 (diff) |
Merge branch 'topic/core' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dma
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/Kconfig | 2 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 29 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 1 | ||||
-rw-r--r-- | sound/soc/soc-io.c | 5 |
4 files changed, 17 insertions, 20 deletions
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 45b72561c615..350b86458971 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig | |||
@@ -324,7 +324,7 @@ config SND_SOC_TLV320AIC23 | |||
324 | tristate | 324 | tristate |
325 | 325 | ||
326 | config SND_SOC_TLV320AIC26 | 326 | config SND_SOC_TLV320AIC26 |
327 | tristate "TI TLV320AIC26 Codec support" if SND_SOC_OF_SIMPLE | 327 | tristate |
328 | depends on SPI | 328 | depends on SPI |
329 | 329 | ||
330 | config SND_SOC_TLV320AIC32X4 | 330 | config SND_SOC_TLV320AIC32X4 |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index b7e84a7cd9ee..4d24b5ea3ba7 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -3906,7 +3906,7 @@ EXPORT_SYMBOL_GPL(snd_soc_unregister_dais); | |||
3906 | * @platform: platform to register | 3906 | * @platform: platform to register |
3907 | */ | 3907 | */ |
3908 | int snd_soc_register_platform(struct device *dev, | 3908 | int snd_soc_register_platform(struct device *dev, |
3909 | struct snd_soc_platform_driver *platform_drv) | 3909 | const struct snd_soc_platform_driver *platform_drv) |
3910 | { | 3910 | { |
3911 | struct snd_soc_platform *platform; | 3911 | struct snd_soc_platform *platform; |
3912 | 3912 | ||
@@ -4022,8 +4022,8 @@ int snd_soc_register_codec(struct device *dev, | |||
4022 | /* create CODEC component name */ | 4022 | /* create CODEC component name */ |
4023 | codec->name = fmt_single_name(dev, &codec->id); | 4023 | codec->name = fmt_single_name(dev, &codec->id); |
4024 | if (codec->name == NULL) { | 4024 | if (codec->name == NULL) { |
4025 | kfree(codec); | 4025 | ret = -ENOMEM; |
4026 | return -ENOMEM; | 4026 | goto fail_codec; |
4027 | } | 4027 | } |
4028 | 4028 | ||
4029 | if (codec_drv->compress_type) | 4029 | if (codec_drv->compress_type) |
@@ -4062,7 +4062,7 @@ int snd_soc_register_codec(struct device *dev, | |||
4062 | reg_size, GFP_KERNEL); | 4062 | reg_size, GFP_KERNEL); |
4063 | if (!codec->reg_def_copy) { | 4063 | if (!codec->reg_def_copy) { |
4064 | ret = -ENOMEM; | 4064 | ret = -ENOMEM; |
4065 | goto fail; | 4065 | goto fail_codec_name; |
4066 | } | 4066 | } |
4067 | } | 4067 | } |
4068 | } | 4068 | } |
@@ -4086,18 +4086,22 @@ int snd_soc_register_codec(struct device *dev, | |||
4086 | mutex_unlock(&client_mutex); | 4086 | mutex_unlock(&client_mutex); |
4087 | 4087 | ||
4088 | /* register any DAIs */ | 4088 | /* register any DAIs */ |
4089 | if (num_dai) { | 4089 | ret = snd_soc_register_dais(dev, dai_drv, num_dai); |
4090 | ret = snd_soc_register_dais(dev, dai_drv, num_dai); | 4090 | if (ret < 0) { |
4091 | if (ret < 0) | 4091 | dev_err(codec->dev, "ASoC: Failed to regster DAIs: %d\n", ret); |
4092 | dev_err(codec->dev, "ASoC: Failed to regster" | 4092 | goto fail_codec_name; |
4093 | " DAIs: %d\n", ret); | ||
4094 | } | 4093 | } |
4095 | 4094 | ||
4096 | dev_dbg(codec->dev, "ASoC: Registered codec '%s'\n", codec->name); | 4095 | dev_dbg(codec->dev, "ASoC: Registered codec '%s'\n", codec->name); |
4097 | return 0; | 4096 | return 0; |
4098 | 4097 | ||
4099 | fail: | 4098 | fail_codec_name: |
4099 | mutex_lock(&client_mutex); | ||
4100 | list_del(&codec->list); | ||
4101 | mutex_unlock(&client_mutex); | ||
4102 | |||
4100 | kfree(codec->name); | 4103 | kfree(codec->name); |
4104 | fail_codec: | ||
4101 | kfree(codec); | 4105 | kfree(codec); |
4102 | return ret; | 4106 | return ret; |
4103 | } | 4107 | } |
@@ -4111,7 +4115,6 @@ EXPORT_SYMBOL_GPL(snd_soc_register_codec); | |||
4111 | void snd_soc_unregister_codec(struct device *dev) | 4115 | void snd_soc_unregister_codec(struct device *dev) |
4112 | { | 4116 | { |
4113 | struct snd_soc_codec *codec; | 4117 | struct snd_soc_codec *codec; |
4114 | int i; | ||
4115 | 4118 | ||
4116 | list_for_each_entry(codec, &codec_list, list) { | 4119 | list_for_each_entry(codec, &codec_list, list) { |
4117 | if (dev == codec->dev) | 4120 | if (dev == codec->dev) |
@@ -4120,9 +4123,7 @@ void snd_soc_unregister_codec(struct device *dev) | |||
4120 | return; | 4123 | return; |
4121 | 4124 | ||
4122 | found: | 4125 | found: |
4123 | if (codec->num_dai) | 4126 | snd_soc_unregister_dais(dev, codec->num_dai); |
4124 | for (i = 0; i < codec->num_dai; i++) | ||
4125 | snd_soc_unregister_dai(dev); | ||
4126 | 4127 | ||
4127 | mutex_lock(&client_mutex); | 4128 | mutex_lock(&client_mutex); |
4128 | list_del(&codec->list); | 4129 | list_del(&codec->list); |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 1d6a9b3ceb27..625d4824abbb 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -3123,7 +3123,6 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, | |||
3123 | break; | 3123 | break; |
3124 | } | 3124 | } |
3125 | 3125 | ||
3126 | dapm->n_widgets++; | ||
3127 | w->dapm = dapm; | 3126 | w->dapm = dapm; |
3128 | w->codec = dapm->codec; | 3127 | w->codec = dapm->codec; |
3129 | w->platform = dapm->platform; | 3128 | w->platform = dapm->platform; |
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index 29183ef2b93d..8ca9ecc5ac57 100644 --- a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c | |||
@@ -158,10 +158,7 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, | |||
158 | return -EINVAL; | 158 | return -EINVAL; |
159 | } | 159 | } |
160 | 160 | ||
161 | if (IS_ERR(codec->control_data)) | 161 | return PTR_RET(codec->control_data); |
162 | return PTR_ERR(codec->control_data); | ||
163 | |||
164 | return 0; | ||
165 | } | 162 | } |
166 | EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io); | 163 | EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io); |
167 | #else | 164 | #else |