aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-jack.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-jack.c')
-rw-r--r--sound/soc/soc-jack.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 9f07551e155f..4d95abb40288 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -60,6 +60,7 @@ EXPORT_SYMBOL_GPL(snd_soc_jack_new);
60void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) 60void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
61{ 61{
62 struct snd_soc_codec *codec; 62 struct snd_soc_codec *codec;
63 struct snd_soc_dapm_context *dapm;
63 struct snd_soc_jack_pin *pin; 64 struct snd_soc_jack_pin *pin;
64 int enable; 65 int enable;
65 int oldstatus; 66 int oldstatus;
@@ -68,6 +69,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
68 return; 69 return;
69 70
70 codec = jack->codec; 71 codec = jack->codec;
72 dapm = &codec->dapm;
71 73
72 mutex_lock(&codec->mutex); 74 mutex_lock(&codec->mutex);
73 75
@@ -88,15 +90,15 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
88 enable = !enable; 90 enable = !enable;
89 91
90 if (enable) 92 if (enable)
91 snd_soc_dapm_enable_pin(codec, pin->pin); 93 snd_soc_dapm_enable_pin(dapm, pin->pin);
92 else 94 else
93 snd_soc_dapm_disable_pin(codec, pin->pin); 95 snd_soc_dapm_disable_pin(dapm, pin->pin);
94 } 96 }
95 97
96 /* Report before the DAPM sync to help users updating micbias status */ 98 /* Report before the DAPM sync to help users updating micbias status */
97 blocking_notifier_call_chain(&jack->notifier, status, NULL); 99 blocking_notifier_call_chain(&jack->notifier, status, NULL);
98 100
99 snd_soc_dapm_sync(codec); 101 snd_soc_dapm_sync(dapm);
100 102
101 snd_jack_report(jack->jack, status); 103 snd_jack_report(jack->jack, status);
102 104