Skip to content

Commit

Permalink
ASoC: Remove CODEC pointer from snd_soc_dapm_context
Browse files Browse the repository at this point in the history
The only remaining user of the CODEC pointer in the DAPM struct is to
initialize the CODEC pointer in the widget struct. The later is scheduled
for removal, but has still a few users left. For now use
dapm->component->codec to initialize it.

Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
larsclausen authored and broonie committed Sep 29, 2014
1 parent a761f87 commit 0bd2ac3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion include/sound/soc-dapm.h
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,6 @@ struct snd_soc_dapm_context {

struct device *dev; /* from parent - for debug */
struct snd_soc_component *component; /* parent component */
struct snd_soc_codec *codec; /* parent codec */
struct snd_soc_card *card; /* parent card */

/* used during DAPM updates */
Expand Down
1 change: 0 additions & 1 deletion sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4351,7 +4351,6 @@ int snd_soc_register_codec(struct device *dev,
if (codec_drv->read)
codec->component.read = snd_soc_codec_drv_read;
codec->component.ignore_pmdown_time = codec_drv->ignore_pmdown_time;
codec->dapm.codec = codec;
codec->dapm.idle_bias_off = codec_drv->idle_bias_off;
if (codec_drv->seq_notifier)
codec->dapm.seq_notifier = codec_drv->seq_notifier;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3107,7 +3107,7 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
}

w->dapm = dapm;
w->codec = dapm->codec;
w->codec = dapm->component->codec;
INIT_LIST_HEAD(&w->sources);
INIT_LIST_HEAD(&w->sinks);
INIT_LIST_HEAD(&w->list);
Expand Down

0 comments on commit 0bd2ac3

Please sign in to comment.