Skip to contentSkip to conversation

Input: st1232 - include gpio/consumer.h header for gpiod_set_value_cansleep()

PATCH In review Martin Kepplinger 2 participants 2 messages Feb 13, 2019 – Feb 17, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 201902131841.xHSZ8Cvm%[email protected]

#1 lore raw

PATCH 1/1 Input: st1232 - include gpio/consumer.h header for gpiod_set_value_cansleep()

gpiod_set_value_cansleep() needs it's declaration in the corresponding header. This fixes build errors like

drivers/input/touchscreen/st1232.c: In function 'st1232_ts_power':

Quoted 1 line
Quoted 1 line

drivers/input/touchscreen/st1232.c:146: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, !poweron);
      ^~~~~~~~~~~~~~~~~~~~~~~~
      gpio_set_value_cansleep

---

 drivers/input/touchscreen/st1232.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/touchscreen/st1232.c +1 -0
index 1fbc0847416b..f4b7a4f1c366 100644
@@ -18,6 +18,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/pm_qos.h>
 #include <linux/slab.h>
 #include <linux/types.h>
Signature · 1 line
2.20.1
maintainer
#2 lore raw
Quoted 4 lines · Martin Kepplinger

gpiod_set_value_cansleep() needs it's declaration in the corresponding header. This fixes build errors like

   drivers/input/touchscreen/st1232.c: In function 'st1232_ts_power':
Quoted 8 lines
Quoted 1 line
Quoted 1 line

drivers/input/touchscreen/st1232.c:146: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, !poweron);
      ^~~~~~~~~~~~~~~~~~~~~~~~
      gpio_set_value_cansleep

Thanks Martin, I'll fold it into the original patch introducing gpiod so we keep bisectability.

Signature · 1 line
Dmitry