Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372003
b: refs/heads/master
c: 8b1b054
h: refs/heads/master
i:
  372001: 7a08ad2
  371999: 36faf33
v: v3
  • Loading branch information
Mark Brown committed Apr 17, 2013
1 parent ba66d00 commit 2e80757
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c1c1d4a7b4ca1266057a3632d27450f5575caf9
refs/heads/master: 8b1b054f6be2c3f94bf027ad37bc85d9ec67677f
1 change: 0 additions & 1 deletion trunk/include/sound/soc-dapm.h
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,6 @@ struct snd_soc_dapm_update {

/* DAPM context */
struct snd_soc_dapm_context {
int n_widgets; /* number of widgets in this context */
enum snd_soc_bias_level bias_level;
enum snd_soc_bias_level suspend_bias_level;
struct delayed_work delayed_work;
Expand Down
9 changes: 4 additions & 5 deletions trunk/include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ int snd_soc_suspend(struct device *dev);
int snd_soc_resume(struct device *dev);
int snd_soc_poweroff(struct device *dev);
int snd_soc_register_platform(struct device *dev,
struct snd_soc_platform_driver *platform_drv);
const struct snd_soc_platform_driver *platform_drv);
void snd_soc_unregister_platform(struct device *dev);
int snd_soc_register_codec(struct device *dev,
const struct snd_soc_codec_driver *codec_drv,
Expand Down Expand Up @@ -801,10 +801,10 @@ struct snd_soc_platform_driver {
struct snd_soc_dai *);

/* platform stream pcm ops */
struct snd_pcm_ops *ops;
const struct snd_pcm_ops *ops;

/* platform stream compress ops */
struct snd_compr_ops *compr_ops;
const struct snd_compr_ops *compr_ops;

/* platform stream completion event */
int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
Expand All @@ -823,7 +823,7 @@ struct snd_soc_platform {
const char *name;
int id;
struct device *dev;
struct snd_soc_platform_driver *driver;
const struct snd_soc_platform_driver *driver;
struct mutex mutex;

unsigned int suspended:1; /* platform is suspended */
Expand Down Expand Up @@ -1086,7 +1086,6 @@ struct soc_enum {
unsigned int mask;
const char * const *texts;
const unsigned int *values;
void *dapm;
};

/* codec IO */
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ config SND_SOC_TLV320AIC23
tristate

config SND_SOC_TLV320AIC26
tristate "TI TLV320AIC26 Codec support" if SND_SOC_OF_SIMPLE
tristate
depends on SPI

config SND_SOC_TLV320AIC32X4
Expand Down
29 changes: 15 additions & 14 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3906,7 +3906,7 @@ EXPORT_SYMBOL_GPL(snd_soc_unregister_dais);
* @platform: platform to register
*/
int snd_soc_register_platform(struct device *dev,
struct snd_soc_platform_driver *platform_drv)
const struct snd_soc_platform_driver *platform_drv)
{
struct snd_soc_platform *platform;

Expand Down Expand Up @@ -4022,8 +4022,8 @@ int snd_soc_register_codec(struct device *dev,
/* create CODEC component name */
codec->name = fmt_single_name(dev, &codec->id);
if (codec->name == NULL) {
kfree(codec);
return -ENOMEM;
ret = -ENOMEM;
goto fail_codec;
}

if (codec_drv->compress_type)
Expand Down Expand Up @@ -4062,7 +4062,7 @@ int snd_soc_register_codec(struct device *dev,
reg_size, GFP_KERNEL);
if (!codec->reg_def_copy) {
ret = -ENOMEM;
goto fail;
goto fail_codec_name;
}
}
}
Expand All @@ -4086,18 +4086,22 @@ int snd_soc_register_codec(struct device *dev,
mutex_unlock(&client_mutex);

/* register any DAIs */
if (num_dai) {
ret = snd_soc_register_dais(dev, dai_drv, num_dai);
if (ret < 0)
dev_err(codec->dev, "ASoC: Failed to regster"
" DAIs: %d\n", ret);
ret = snd_soc_register_dais(dev, dai_drv, num_dai);
if (ret < 0) {
dev_err(codec->dev, "ASoC: Failed to regster DAIs: %d\n", ret);
goto fail_codec_name;
}

dev_dbg(codec->dev, "ASoC: Registered codec '%s'\n", codec->name);
return 0;

fail:
fail_codec_name:
mutex_lock(&client_mutex);
list_del(&codec->list);
mutex_unlock(&client_mutex);

kfree(codec->name);
fail_codec:
kfree(codec);
return ret;
}
Expand All @@ -4111,7 +4115,6 @@ EXPORT_SYMBOL_GPL(snd_soc_register_codec);
void snd_soc_unregister_codec(struct device *dev)
{
struct snd_soc_codec *codec;
int i;

list_for_each_entry(codec, &codec_list, list) {
if (dev == codec->dev)
Expand All @@ -4120,9 +4123,7 @@ void snd_soc_unregister_codec(struct device *dev)
return;

found:
if (codec->num_dai)
for (i = 0; i < codec->num_dai; i++)
snd_soc_unregister_dai(dev);
snd_soc_unregister_dais(dev, codec->num_dai);

mutex_lock(&client_mutex);
list_del(&codec->list);
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3123,7 +3123,6 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
break;
}

dapm->n_widgets++;
w->dapm = dapm;
w->codec = dapm->codec;
w->platform = dapm->platform;
Expand Down
5 changes: 1 addition & 4 deletions trunk/sound/soc/soc-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,7 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
return -EINVAL;
}

if (IS_ERR(codec->control_data))
return PTR_ERR(codec->control_data);

return 0;
return PTR_RET(codec->control_data);
}
EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io);
#else
Expand Down

0 comments on commit 2e80757

Please sign in to comment.