From: Krzysztof Kozlowski Date: Thu, 25 Jan 2024 08:16:01 +0000 (+0100) Subject: gpiolib: add gpio_device_get_label() stub for !GPIOLIB X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2df8aa3cad407044f2febdbbdf220c6dae839c79;p=linux.git gpiolib: add gpio_device_get_label() stub for !GPIOLIB Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled. Cc: Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()") Suggested-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski --- diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index c1df7698edb03..7f75c9a518741 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -831,6 +831,12 @@ static inline int gpio_device_get_base(struct gpio_device *gdev) return -ENODEV; } +static inline const char *gpio_device_get_label(struct gpio_device *gdev) +{ + WARN_ON(1); + return NULL; +} + static inline int gpiochip_lock_as_irq(struct gpio_chip *gc, unsigned int offset) {