summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2024-01-25 11:15:59 +0300
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-02-13 13:02:47 +0300
commit6ac86372102b477083db99a9af8246fb916271b5 (patch)
treedf4bf298b7d4827d86609663545a3028ad7fa636 /include/linux
parent841c35169323cd833294798e58b9bf63fa4fa1de (diff)
downloadlinux-6ac86372102b477083db99a9af8246fb916271b5.tar.xz
gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB
Add empty stub of gpiod_to_gpio_device() when GPIOLIB is not enabled. Cc: <stable@vger.kernel.org> Fixes: 370232d096e3 ("gpiolib: provide gpiod_to_gpio_device()") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/gpio/driver.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 9a5c6c76e653..012797e7106d 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -819,6 +819,12 @@ static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
return ERR_PTR(-ENODEV);
}
+static inline struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc)
+{
+ WARN_ON(1);
+ return ERR_PTR(-ENODEV);
+}
+
static inline int gpiochip_lock_as_irq(struct gpio_chip *gc,
unsigned int offset)
{