Skip to contentSkip to conversation

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

PATCH In review Jarkko Nikula 3 participants 3 messages Aug 23, 2010

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

PATCH 1/1 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 9c4ba94 and to get a stack trace if ever executing this code in atomic context.

---
 sound/soc/omap/rx51.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/omap/rx51.c +2 -2
index d1d8098..04b5723 100644
@@ -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;
 }
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jarkko Nikula

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 9c4ba94 and to get a stack trace if ever executing this code in atomic context.

#2 lore raw
Quoted 9 lines · Mark Brown
Quoted 6 lines · Jarkko Nikula

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 9c4ba94 and to get a stack trace if ever executing this code in atomic context.

All 3 applied.

Thanks

Liam

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk