ASoC: Allow reporting of NULL jacks
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 29 Mar 2010 19:31:14 +0000 (20:31 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 23 Apr 2010 16:07:10 +0000 (17:07 +0100)
Follow the core jack implementation and allow reporting on the status
of NULL jacks, avoiding the need to check in detection implementations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
sound/soc/soc-jack.c

index f8fd22cc70bcd49aed383d7b52b7673211e1cc9c..29159e1781d0edbc681a8120865323171a7a4906 100644 (file)
@@ -64,10 +64,9 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
        int enable;
        int oldstatus;
 
-       if (!jack) {
-               WARN_ON_ONCE(!jack);
+       if (!jack)
                return;
-       }
+
        codec = jack->card->codec;
 
        mutex_lock(&codec->mutex);