diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-04-12 19:31:05 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-04-13 19:34:54 +0200 |
commit | 621206b76825f24ccb650b9f59c18c17f6760a4c (patch) | |
tree | fe2cc834ceeeff4a0c1454f33855473f2ba99883 /sound/soc/jz4740 | |
parent | ASoC: JZ4740: qi_lb60: Use gpio_request_array to request and setup gpios (diff) | |
download | linux-621206b76825f24ccb650b9f59c18c17f6760a4c.tar.xz linux-621206b76825f24ccb650b9f59c18c17f6760a4c.zip |
ASoC: JZ4740: qi_lb60: Use the SND_SOC_DAPM_EVENT_OFF for the speakers status
Use SND_SOC_DAPM_EVENT_OFF for determining whether the speaker should be turned
on or off instead of open coding it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/jz4740')
-rw-r--r-- | sound/soc/jz4740/qi_lb60.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/soc/jz4740/qi_lb60.c b/sound/soc/jz4740/qi_lb60.c index 8c4e84bcc320..c5fc339f68f1 100644 --- a/sound/soc/jz4740/qi_lb60.c +++ b/sound/soc/jz4740/qi_lb60.c @@ -27,11 +27,7 @@ static int qi_lb60_spk_event(struct snd_soc_dapm_widget *widget, struct snd_kcontrol *ctrl, int event) { - int on = 0; - if (event & SND_SOC_DAPM_POST_PMU) - on = 1; - else if (event & SND_SOC_DAPM_PRE_PMD) - on = 0; + int on = !SND_SOC_DAPM_EVENT_OFF(event); gpio_set_value(QI_LB60_SND_GPIO, on); gpio_set_value(QI_LB60_AMP_GPIO, on); |