6.7-stable review patch. If anyone has any objections, please let me know. ------------------ From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> commit 6ac86372102b477083db99a9af8246fb916271b5 upstream. Add empty stub of gpiod_to_gpio_device() when GPIOLIB is not enabled. Cc: <stable@xxxxxxxxxxxxxxx> Fixes: 370232d096e3 ("gpiolib: provide gpiod_to_gpio_device()") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- include/linux/gpio/driver.h | 6 ++++++ 1 file changed, 6 insertions(+) --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -806,6 +806,12 @@ static inline int gpio_device_get_base(s return -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) {