projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5771a8c
)
ASoC: sun4i-codec: Remove unneeded gpiod NULL check
author
Fabio Estevam
<fabio.estevam@nxp.com>
Sun, 16 Jul 2017 21:11:06 +0000
(18:11 -0300)
committer
Mark Brown
<broonie@kernel.org>
Mon, 17 Jul 2017 14:40:05 +0000
(15:40 +0100)
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun4i-codec.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/sunxi/sun4i-codec.c
b/sound/soc/sunxi/sun4i-codec.c
index 150069987c0c3e5fd463636be8e46a832834cb1b..4c37231f254b53adf675440eee5637a890efaa38 100644
(file)
--- 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;
}