summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2011-02-10 16:22:23 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-11 12:17:43 +0100
commit535787b6ae081171a5e7dbf0158ef9fa56d59dc8 (patch)
tree88cd5e020583a6ce222c8c4b4b71e69bf52cd592
parentASoC: mid-x86: Use the soc-jack apis for jack type detection (diff)
downloadlinux-535787b6ae081171a5e7dbf0158ef9fa56d59dc8.tar.xz
linux-535787b6ae081171a5e7dbf0158ef9fa56d59dc8.zip
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 <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/soc-jack.c2
1 files changed, 1 insertions, 1 deletions
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;