summaryrefslogtreecommitdiff
path: root/drivers/extcon/extcon-usb-gpio.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-05-05 18:32:20 +0200
committerChanwoo Choi <cw00.choi@samsung.com>2015-05-19 16:39:06 +0900
commit638f958baeaf9d50f42cd09993f518b3a7a0f52e (patch)
tree5d07f80481526a1991b77ae3b992024c496be6b8 /drivers/extcon/extcon-usb-gpio.c
parentc571bbb4b699cfd3af5b4c1027b04eb4290e6726 (diff)
extcon: Allow compile test of GPIO consumers if !GPIOLIB
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. If GPIOLIB=n and asm-generic/gpio.h is not used: drivers/extcon/extcon-usb-gpio.c: In function ‘usb_extcon_detect_cable’: drivers/extcon/extcon-usb-gpio.c:63: error: implicit declaration of function ‘gpiod_get_value_cansleep’ drivers/extcon/extcon-usb-gpio.c: In function ‘usb_extcon_probe’: drivers/extcon/extcon-usb-gpio.c:116: error: implicit declaration of function ‘devm_gpiod_get’ drivers/extcon/extcon-usb-gpio.c:116: warning: assignment makes pointer from integer without a cast drivers/extcon/extcon-usb-gpio.c:122: error: implicit declaration of function ‘gpiod_set_debounce’ drivers/extcon/extcon-usb-gpio.c:129: error: implicit declaration of function ‘gpiod_to_irq’ Add the missing #include <linux/gpio/consumer.h> to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-usb-gpio.c')
-rw-r--r--drivers/extcon/extcon-usb-gpio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c
index e45d1f13f445..160ec12c2653 100644
--- a/drivers/extcon/extcon-usb-gpio.c
+++ b/drivers/extcon/extcon-usb-gpio.c
@@ -15,6 +15,7 @@
*/
#include <linux/extcon.h>
+#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/irq.h>