From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755055AbdKNLkR (ORCPT ); Tue, 14 Nov 2017 06:40:17 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:54780 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755024AbdKNLkM (ORCPT ); Tue, 14 Nov 2017 06:40:12 -0500 From: Arnd Bergmann To: Linus Walleij Cc: Arnd Bergmann , Thomas Gleixner , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpio: always include linux/gpio/consumer.h in linux/gpio.h Date: Tue, 14 Nov 2017 12:39:47 +0100 Message-Id: <20171114114002.234250-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:hnUZXLp7evLzT0I+TeE6ktrgiRAAS14/ytBKi+ZCv5JgL02ExbU qpuo9I6VB0rRoTDEqtyaWarft2inJUkGQzxtVkKnn7BZ2Ss4kqX2fOxrYOhFlc7/upz+TZj K9lBVJqs8iakXaYgkBExUXt4NayQ5+PCvjd76sSMw3eTC+fjaVV7jMP5ice8JYUm5JqdJ/x pe+r1lBeOqErk95d+p73A== X-UI-Out-Filterresults: notjunk:1;V01:K0:LC38KClPsBw=:F0FuJOh9/Cn6V9AHdOTUUs 6nUzBU5zmtE9nCV/r0aW9CCjBFVX2b0A6lBSnPOeTZRRZsMfwEojhnK/dLoZ+MrgHsbxEh63o 6uW0UBDq65EDSoyT9t1ZyIA0/rT462jmaPPufc2++2YbLR9hKj6cXamOElIrE4isqQTfmXqw8 WewEh/SfQrE+qsFcNLU72EfnFWIUuY5SVawx6nfEAYC05Y+G0sHKg+WTuWx54OxhdSq+y61XQ 9BJKaeQSJ/5GYDWztfd5MDcuAhiW4Bp/IRocydqw5dLNKCOHGeGKBMfnS753PbMUzKxAshl9t SvJhn3BDJFtrC+okKZbmN9RN/Lnv6HmvjrYYLT+vDd9Zkw+ufncShs/MaUD9b+d4eMiUNO7vG pjUO3AsNzHctg2ejPuR+BJibfmv29Qa+j3oB4MexSzrPVUzEwsG5jX0Qy9dbgytbXFX7lQh3S P7yUCaWwXagWI6Xh643FSjGz2ShzoMbW4d+ncd45VpwwxFhlTtQHPx/3hI5UEGAV86tFVQ4d+ vDMgyH8TCAT5VvX0l2I2rYzT6LfIKbisiY0fqITwsHqbf8JLAbnZZAenEwQlppLJsrR/PIIGI wNXvqk3QHdgISvHiYZPl/tDAx4ZJQ90qpymym0m0OxRx1UiX7FqLxiLiVSagFMXlbQ2a+Pm+X rEUKDnUfwIVQLbbUsQ31nV3fZggneZPMk7LbbZCr0lHhog9hQuCcWxjpx005t8m/3R2PTt38r RAh3TKrIPYsXaU1Xw0aVeuB72C1qtLLnqn2Rbg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org linux/gpio/consumer.h is a bit odd, it contains definitions for a number of the advanced gpio interfaces, in variants for both gpiolib-based platforms and those not using gpiolib. The file gets included implicitly by linux/gpio.h, but only if gpiolib is enabled. Driver writers regularly fail to notice this and include the top-level linux/gpio.h but use the newer interfaces. The latest such driver is a new touchscreen driver that produced this build failure on an x86 randconfig build: drivers/input/touchscreen/hideep.c: In function 'hideep_power_on': drivers/input/touchscreen/hideep.c:670:3: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration] gpiod_set_value_cansleep(ts->reset_gpio, 0); I don't want to manually add linux/gpio/consumer.h inclusions to each such file any more, so let's just include this in linux/gpio.h for everyone. Fixes: 842ff286166e ("Input: add support for HiDeep touchscreen") Signed-off-by: Arnd Bergmann --- include/linux/gpio.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 8ef7fc0ce0f0..7f6c6d31949f 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h @@ -89,6 +89,7 @@ void devm_gpio_free(struct device *dev, unsigned int gpio); #else /* ! CONFIG_GPIOLIB */ +#include #include #include #include -- 2.9.0