]> asedeno.scripts.mit.edu Git - linux.git/commit
Input: msm-vibrator - use correct gpio header
authorArnd Bergmann <arnd@arndb.de>
Sat, 9 Mar 2019 23:32:56 +0000 (15:32 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 9 Mar 2019 23:57:15 +0000 (15:57 -0800)
commit741c73ed35014110287f493aa27a1292eb816137
tree490ffde3b3587eb36e2e418cd134cfb205d018b8
parent65e91e2845b5b8965f21a856e1e0ad70c6522ce7
Input: msm-vibrator - use correct gpio header

When CONFIG_GPIOLIB is not set, we get a couple of build
errors during test building:

drivers/input/misc/msm-vibrator.c: In function 'msm_vibrator_start':
drivers/input/misc/msm-vibrator.c:79: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(vibrator->enable_gpio, 1);
   ^~~~~~~~~~~~~~~~~~~~~~~~
   gpio_set_value_cansleep
drivers/input/misc/msm-vibrator.c: In function 'msm_vibrator_probe':
drivers/input/misc/msm-vibrator.c:176:26: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
  vibrator->enable_gpio = devm_gpiod_get(&pdev->dev, "enable",
                          ^~~~~~~~~~~~~~
                          devm_gpio_free
drivers/input/misc/msm-vibrator.c:177:13: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
             GPIOD_OUT_LOW);
             ^~~~~~~~~~~~~
             GPIOF_INIT_LOW
drivers/input/misc/msm-vibrator.c:177:13: note: each undeclared identifier is reported only once for each function it appears in

This is easy to avoid when we use gpio/consumer.h as the documented interface.

Fixes: 0f681d09e66e ("Input: add new vibrator driver for various MSM SOCs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/msm-vibrator.c