diff --git a/drivers/input/gpio_keys.c b/drivers/input/gpio_keys.c index 9486b9a..d017594 100644 --- a/drivers/input/gpio_keys.c +++ b/drivers/input/gpio_keys.c @@ -121,7 +121,7 @@ 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);