[alsa-devel] [PATCH v8 4/7] ASoC: simple-amplifier: make enable-gpio optional
Vasily Khoruzhick
anarsoul at gmail.com
Wed Nov 21 06:17:49 CET 2018
Amplifier may have no enable GPIO, so make this property
optional.
Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
---
sound/soc/codecs/simple-amplifier.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/simple-amplifier.c b/sound/soc/codecs/simple-amplifier.c
index c07e8a80b4b7..351aa55c384e 100644
--- a/sound/soc/codecs/simple-amplifier.c
+++ b/sound/soc/codecs/simple-amplifier.c
@@ -89,7 +89,8 @@ static int simple_amp_probe(struct platform_device *pdev)
return -ENOMEM;
platform_set_drvdata(pdev, priv);
- priv->gpiod_enable = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
+ priv->gpiod_enable = devm_gpiod_get_optional(dev, "enable",
+ GPIOD_OUT_LOW);
if (IS_ERR(priv->gpiod_enable)) {
err = PTR_ERR(priv->gpiod_enable);
if (err != -EPROBE_DEFER)
--
2.19.1
More information about the Alsa-devel
mailing list