ASoC: wm8994: Don't bother updating the jackdet mode needlessly
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 3 Mar 2012 00:10:02 +0000 (00:10 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 4 Apr 2012 11:35:20 +0000 (12:35 +0100)
If we're not doing jackdet it's not needed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8994.c

index c9af13f14331f23458a7a62787ede1cb3ee5facf..44f72dc27711db273dca411d063d263fcf7bcf62 100644 (file)
@@ -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->jackdet || !wm8994->jack_cb)
                return;