Skip to content

Commit 6ac8637

Browse files
krzkBartosz Golaszewski
authored andcommitted
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: 370232d ("gpiolib: provide gpiod_to_gpio_device()") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent 841c351 commit 6ac8637

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/linux/gpio/driver.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,12 @@ static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
819819
return ERR_PTR(-ENODEV);
820820
}
821821

822+
static inline struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc)
823+
{
824+
WARN_ON(1);
825+
return ERR_PTR(-ENODEV);
826+
}
827+
822828
static inline int gpiochip_lock_as_irq(struct gpio_chip *gc,
823829
unsigned int offset)
824830
{

0 commit comments

Comments
 (0)