From: Jarkko Nikula Date: Thu, 10 Feb 2011 15:22:23 +0000 (+0200) Subject: ASoC: Allow use sleeping gpio in soc-jack X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=535787b6ae081171a5e7dbf0158ef9fa56d59dc8;p=linux-beck.git ASoC: Allow use sleeping gpio in soc-jack 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 Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 99dbaf756b44..4579ee090bbf 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -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;