* [PATCH] ASoC: Allow use sleeping gpio in soc-jack
@ 2011-02-10 15:22 Jarkko Nikula
2011-02-10 23:03 ` Liam Girdwood
2011-02-11 11:17 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Jarkko Nikula @ 2011-02-10 15:22 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Liam Girdwood
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>
---
Only compile tested.
---
sound/soc/soc-jack.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 99dbaf7..4579ee0 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;
--
1.7.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: Allow use sleeping gpio in soc-jack
2011-02-10 15:22 [PATCH] ASoC: Allow use sleeping gpio in soc-jack Jarkko Nikula
@ 2011-02-10 23:03 ` Liam Girdwood
2011-02-11 11:17 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2011-02-10 23:03 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: alsa-devel, Mark Brown
On Thu, 2011-02-10 at 17:22 +0200, Jarkko Nikula wrote:
> 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>
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: Allow use sleeping gpio in soc-jack
2011-02-10 15:22 [PATCH] ASoC: Allow use sleeping gpio in soc-jack Jarkko Nikula
2011-02-10 23:03 ` Liam Girdwood
@ 2011-02-11 11:17 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-02-11 11:17 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: alsa-devel, Liam Girdwood
On Thu, Feb 10, 2011 at 05:22:23PM +0200, Jarkko Nikula wrote:
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-11 11:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 15:22 [PATCH] ASoC: Allow use sleeping gpio in soc-jack Jarkko Nikula
2011-02-10 23:03 ` Liam Girdwood
2011-02-11 11:17 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.