diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-04-19 17:25:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-04-20 08:50:01 -0400 |
commit | a32955dba2e2629bddacf7c1b9de3bf1b7c56acf (patch) | |
tree | b5813978cdff2aa4c1418c78ee078b40ed553694 /sound/soc/tegra | |
parent | 075413966a6ea389f78f4cc2e957708c1d6db8c5 (diff) |
ASoC: Tegra: Retrieve card from DAPM context not codec
Card widgets are created in the card's DAPM context, not any codec's DAPM
context. Hence, w->codec==NULL. Instead, find the card from the widget
through the DAPM context of the widget, not the codec of the widget.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r-- | sound/soc/tegra/tegra_wm8903.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c index 988ff504dd59..9a439fb12447 100644 --- a/sound/soc/tegra/tegra_wm8903.c +++ b/sound/soc/tegra/tegra_wm8903.c | |||
@@ -156,8 +156,8 @@ static struct snd_soc_jack_pin tegra_wm8903_mic_jack_pins[] = { | |||
156 | static int tegra_wm8903_event_int_spk(struct snd_soc_dapm_widget *w, | 156 | static int tegra_wm8903_event_int_spk(struct snd_soc_dapm_widget *w, |
157 | struct snd_kcontrol *k, int event) | 157 | struct snd_kcontrol *k, int event) |
158 | { | 158 | { |
159 | struct snd_soc_codec *codec = w->codec; | 159 | struct snd_soc_dapm_context *dapm = w->dapm; |
160 | struct snd_soc_card *card = codec->card; | 160 | struct snd_soc_card *card = dapm->card; |
161 | struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); | 161 | struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); |
162 | struct tegra_wm8903_platform_data *pdata = machine->pdata; | 162 | struct tegra_wm8903_platform_data *pdata = machine->pdata; |
163 | 163 | ||
@@ -173,8 +173,8 @@ static int tegra_wm8903_event_int_spk(struct snd_soc_dapm_widget *w, | |||
173 | static int tegra_wm8903_event_hp(struct snd_soc_dapm_widget *w, | 173 | static int tegra_wm8903_event_hp(struct snd_soc_dapm_widget *w, |
174 | struct snd_kcontrol *k, int event) | 174 | struct snd_kcontrol *k, int event) |
175 | { | 175 | { |
176 | struct snd_soc_codec *codec = w->codec; | 176 | struct snd_soc_dapm_context *dapm = w->dapm; |
177 | struct snd_soc_card *card = codec->card; | 177 | struct snd_soc_card *card = dapm->card; |
178 | struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); | 178 | struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card); |
179 | struct tegra_wm8903_platform_data *pdata = machine->pdata; | 179 | struct tegra_wm8903_platform_data *pdata = machine->pdata; |
180 | 180 | ||