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>
This commit is contained in:
parent
7ae7434086
commit
535787b6ae
|
@ -240,7 +240,7 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
|
||||||
int enable;
|
int enable;
|
||||||
int report;
|
int report;
|
||||||
|
|
||||||
enable = gpio_get_value(gpio->gpio);
|
enable = gpio_get_value_cansleep(gpio->gpio);
|
||||||
if (gpio->invert)
|
if (gpio->invert)
|
||||||
enable = !enable;
|
enable = !enable;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue