提交 4fff7a5c 编写于 作者: J Jarkko Nikula 提交者: Liam Girdwood

ASoC: omap: rx51: Use gpio_set_value_cansleep for speaker amp control

Speaker amplifier is controlled by TWL4030 GPIO which may sleep. Therefore
use gpio_set_value_cansleep to get rid of runtime warning that is introduced
after the commit 9c4ba946 and to get a stack trace if ever executing this
code in atomic context.
Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
上级 37b47656
......@@ -146,9 +146,9 @@ static int rx51_spk_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{
if (SND_SOC_DAPM_EVENT_ON(event))
gpio_set_value(RX51_SPEAKER_AMP_TWL_GPIO, 1);
gpio_set_value_cansleep(RX51_SPEAKER_AMP_TWL_GPIO, 1);
else
gpio_set_value(RX51_SPEAKER_AMP_TWL_GPIO, 0);
gpio_set_value_cansleep(RX51_SPEAKER_AMP_TWL_GPIO, 0);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册