Skip to contentSkip to conversation

ASoC: Tegra: Harmony: Remove redundant !!

PATCH In review Stephen Warren 3 participants 3 messages Jan 31, 2011 – Feb 1, 2011

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

PATCH 1/1 ASoC: Tegra: Harmony: Remove redundant !!

gpio_set_value* should accept logic values not just 0 or 1. The WM8903 GPIO driver has been fixed to work this way, so remove the redundant !! previously required when it didn't accept values >1.

---
 sound/soc/tegra/harmony.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/tegra/harmony.c +1 -1
index d1faa63..11e2cb8 100644
@@ -132,7 +132,7 @@ static int harmony_event_int_spk(struct snd_soc_dapm_widget *w,
 	struct harmony_audio_platform_data *pdata = harmony->pdata;
 
 	gpio_set_value_cansleep(pdata->gpio_spkr_en,
-				!!SND_SOC_DAPM_EVENT_ON(event));
+				SND_SOC_DAPM_EVENT_ON(event));
 
 	return 0;
 }
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Stephen Warren

gpio_set_value* should accept logic values not just 0 or 1. The WM8903 GPIO driver has been fixed to work this way, so remove the redundant !! previously required when it didn't accept values >1.

---
 sound/soc/tegra/harmony.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/tegra/harmony.c +0 -0
index d1faa63..11e2cb8 100644

sound/soc/tegra/harmony.c static int harmony_event_int_spk(struct snd_soc_dapm_widget *w, · line 138

Quoted 8 lines
sound/soc/tegra/harmony.c +1 -1
@@ -132,7 +132,7 @@ static int harmony_event_int_spk(struct snd_soc_dapm_widget *w,
 	struct harmony_audio_platform_data *pdata = harmony->pdata;
 
 	gpio_set_value_cansleep(pdata->gpio_spkr_en,
-				!!SND_SOC_DAPM_EVENT_ON(event));
+				SND_SOC_DAPM_EVENT_ON(event));
 
 	return 0;
 }
Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
#2 lore raw
In reply to Stephen Warren
Quoted 3 lines · Stephen Warren

gpio_set_value* should accept logic values not just 0 or 1. The WM8903 GPIO driver has been fixed to work this way, so remove the redundant !! previously required when it didn't accept values >1.

Applied thanks.