summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/gpio_keys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/gpio_keys.c b/drivers/input/gpio_keys.c
index 9486b9a786..d017594662 100644
--- a/drivers/input/gpio_keys.c
+++ b/drivers/input/gpio_keys.c
@@ -121,7 +121,7 @@ static int gpio_keys_probe_dt(struct gpio_keys *gk, struct device_d *dev)
struct device_node *npkey, *np = dev->device_node;
int i = 0, ret;
- if (!IS_ENABLED(CONFIG_OFDEVICE))
+ if (!IS_ENABLED(CONFIG_OFDEVICE) || !IS_ENABLED(CONFIG_OF_GPIO))
return -ENODEV;
gk->nbuttons = of_get_child_count(np);