alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/8] ASoC: sun4i-codec: Remove unneeded gpiod NULL check
@ 2017-07-16 21:11 Fabio Estevam
  2017-07-16 21:11 ` [PATCH 2/8] ASoC: wm8804: " Fabio Estevam
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Fabio Estevam @ 2017-07-16 21:11 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@nxp.com>

The gpiod API checks for NULL descriptors, so there is no need to
duplicate the check in the driver.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 sound/soc/sunxi/sun4i-codec.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 1500699..4c37231 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -1171,9 +1171,8 @@ static int sun4i_codec_spk_event(struct snd_soc_dapm_widget *w,
 {
 	struct sun4i_codec *scodec = snd_soc_card_get_drvdata(w->dapm->card);
 
-	if (scodec->gpio_pa)
-		gpiod_set_value_cansleep(scodec->gpio_pa,
-					 !!SND_SOC_DAPM_EVENT_ON(event));
+	gpiod_set_value_cansleep(scodec->gpio_pa,
+				 !!SND_SOC_DAPM_EVENT_ON(event));
 
 	return 0;
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-07-17 16:06 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-16 21:11 [PATCH 1/8] ASoC: sun4i-codec: Remove unneeded gpiod NULL check Fabio Estevam
2017-07-16 21:11 ` [PATCH 2/8] ASoC: wm8804: " Fabio Estevam
2017-07-17 16:06   ` Applied "ASoC: wm8804: Remove unneeded gpiod NULL check" to the asoc tree Mark Brown
2017-07-16 21:11 ` [PATCH 3/8] ASoC: adau1977: Remove unneeded gpiod NULL check Fabio Estevam
2017-07-17 16:06   ` Applied "ASoC: adau1977: Remove unneeded gpiod NULL check" to the asoc tree Mark Brown
2017-07-16 21:11 ` [PATCH 4/8] ASoC: cs35l33: Remove unneeded gpiod NULL check Fabio Estevam
2017-07-17 16:05   ` Applied "ASoC: cs35l33: Remove unneeded gpiod NULL check" to the asoc tree Mark Brown
2017-07-16 21:11 ` [PATCH 5/8] ASoC: cs35l34: Remove unneeded gpiod NULL check Fabio Estevam
2017-07-17 16:05   ` Applied "ASoC: cs35l34: Remove unneeded gpiod NULL check" to the asoc tree Mark Brown
2017-07-16 21:11 ` [PATCH 6/8] ASoC: cs42l42: Remove unneeded gpiod NULL check Fabio Estevam
2017-07-17 16:05   ` Applied "ASoC: cs42l42: Remove unneeded gpiod NULL check" to the asoc tree Mark Brown
2017-07-16 21:11 ` [PATCH 7/8] ASoC: cs53l30: Remove unneeded gpiod NULL check Fabio Estevam
2017-07-17 16:05   ` Applied "ASoC: cs53l30: Remove unneeded gpiod NULL check" to the asoc tree Mark Brown
2017-07-16 21:11 ` [PATCH 8/8] ASoC: sta32x: Remove unneeded gpiod NULL check Fabio Estevam
2017-07-17 16:05   ` Applied "ASoC: sta32x: Remove unneeded gpiod NULL check" to the asoc tree Mark Brown
2017-07-17 16:06 ` Applied "ASoC: sun4i-codec: " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).