Skip to contentSkip to conversation

ASoC: wm8994: Don't bother updating the jackdet mode needlessly

PATCH New Mark Brown 1 participant 1 message Mar 3, 2012

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: wm8994: Don't bother updating the jackdet mode needlessly

If we're not doing jackdet it's not needed.

---
 sound/soc/codecs/wm8994.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8994.c +3 -0
index 89d1819..57acf52 100644
@@ -686,6 +686,9 @@ static void wm1811_jackdet_set_mode(struct snd_soc_codec *codec, u16 mode)
 {
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
 
+	if (!wm8994->jackdet || !wm8994->jack_cb)
+		return;
+
 	if (wm8994->active_refcount)
 		mode = WM1811_JACKDET_MODE_AUDIO;
 
Signature · 1 line
1.7.9.1