]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: codecs: PCM1789: include gpio/consumer.h
authorArnd Bergmann <arnd@arndb.de>
Wed, 30 May 2018 21:53:45 +0000 (23:53 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 31 May 2018 10:24:42 +0000 (11:24 +0100)
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/pcm1789.c

index 507ac9412d6cbeb6a2c9cb710b9f2dc8e0b3da0b..21f15219b3ad825ebaae5f0db7b45cc59e756765 100644 (file)
@@ -3,7 +3,7 @@
 // Copyright (C) 2018 Bootlin
 // Mylène Josserand <mylene.josserand@bootlin.com>
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/workqueue.h>