summaryrefslogtreecommitdiff
path: root/sound/soc/intel/boards/cht_bsw_max98090_ti.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/intel/boards/cht_bsw_max98090_ti.c')
-rw-r--r--sound/soc/intel/boards/cht_bsw_max98090_ti.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index 36984de8a067..ad45b79d3e4b 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -42,8 +42,7 @@ struct cht_mc_private {
static int platform_clock_control(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{
- struct snd_soc_dapm_context *dapm = w->dapm;
- struct snd_soc_card *card = dapm->card;
+ struct snd_soc_card *card = snd_soc_dapm_to_card(w->dapm);
struct snd_soc_dai *codec_dai;
struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
int ret;
@@ -130,7 +129,7 @@ static int cht_ti_jack_event(struct notifier_block *nb,
unsigned long event, void *data)
{
struct snd_soc_jack *jack = (struct snd_soc_jack *)data;
- struct snd_soc_dapm_context *dapm = &jack->card->dapm;
+ struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(jack->card);
if (event & SND_JACK_MICROPHONE) {
snd_soc_dapm_force_enable_pin(dapm, "SHDN");