Skip to contentSkip to conversation

ASoC: codecs: PCM1789: include gpio/consumer.h

PATCH In review Arnd Bergmann 2 participants 2 messages May 30, 2018 – Jun 14, 2018

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

PATCH 1/1 ASoC: codecs: PCM1789: include gpio/consumer.h

When CONFIG_GPIOLIB is disabled, this codec fails to build because gpio/consumer.h is not included implicitly.

sound/soc/codecs/pcm1789.c: In function 'pcm1789_common_init':
sound/soc/codecs/pcm1789.c:247:19: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'? [-Werror=implicit-function-declaration]

  pcm1789->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
                   ^~~~~~~~~~~~~~~~~~~~~~~
Fixes 4ae340d1be36 ("ASoC: codecs: Add support for PCM1789")
---
 sound/soc/codecs/pcm1789.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/pcm1789.c +1 -1
index 507ac9412d6c..21f15219b3ad 100644
@@ -3,7 +3,7 @@
 // Copyright (C) 2018 Bootlin
 // Mylène Josserand <[email protected]>
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/workqueue.h>
 
Signature · 6 lines
2.9.0

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Arnd Bergmann

When CONFIG_GPIOLIB is disabled, this codec fails to build because gpio/consumer.h is not included implicitly.

sound/soc/codecs/pcm1789.c: In function 'pcm1789_common_init':
sound/soc/codecs/pcm1789.c:247:19: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'? [-Werror=implicit-function-declaration]

  pcm1789->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
                   ^~~~~~~~~~~~~~~~~~~~~~~
Fixes 4ae340d1be36 ("ASoC: codecs: Add support for PCM1789")

Yours,
Linus Walleij