Skip to contentSkip to conversation

ASoC: Allow use sleeping gpio in soc-jack

PATCH Applied Jarkko Nikula 3 participants 3 messages Feb 10, 2011 – Feb 11, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
Only compile tested.

---
 sound/soc/soc-jack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/soc-jack.c +1 -1
index 99dbaf7..4579ee0 100644
@@ -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;
 
Signature · 1 line
1.7.2.3
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jarkko Nikula

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.

---

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
Applied
#2 lore raw
In reply to Jarkko Nikula
Quoted 3 lines · Jarkko Nikula

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.

Applied, thanks.