lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 14 Nov 2017 12:39:47 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] gpio: always include linux/gpio/consumer.h in linux/gpio.h

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 <arnd@...db.de>
---
 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 <linux/gpio/consumer.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/bug.h>
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ