]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Allow use sleeping gpio in soc-jack
authorJarkko Nikula <jhnikula@gmail.com>
Thu, 10 Feb 2011 15:22:23 +0000 (17:22 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 11 Feb 2011 11:17:43 +0000 (11:17 +0000)
It is safe to use sleeping gpio in snd_soc_jack_gpio_detect as it is not
called from interrupt context. This avoids WARN_ON from __gpio_get_value
if sleeping gpio is registered for jack.

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

index 99dbaf756b44913a3f2ac3de7f078f7d349e161d..4579ee090bbfdb061393ff2ef2bb497c722c7eb0 100644 (file)
@@ -240,7 +240,7 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
        int enable;
        int report;
 
-       enable = gpio_get_value(gpio->gpio);
+       enable = gpio_get_value_cansleep(gpio->gpio);
        if (gpio->invert)
                enable = !enable;