Skip to content

Commit ebe0c15

Browse files
krzkBartosz Golaszewski
authored andcommitted
gpiolib: add gpio_device_get_base() stub for !GPIOLIB
Add empty stub of gpio_device_get_base() when GPIOLIB is not enabled. Cc: <stable@vger.kernel.org> Fixes: 8c85a10 ("gpiolib: provide gpio_device_get_base()") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent 6ac8637 commit ebe0c15

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
@@ -825,6 +825,12 @@ static inline struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc)
825825
return ERR_PTR(-ENODEV);
826826
}
827827

828+
static inline int gpio_device_get_base(struct gpio_device *gdev)
829+
{
830+
WARN_ON(1);
831+
return -ENODEV;
832+
}
833+
828834
static inline int gpiochip_lock_as_irq(struct gpio_chip *gc,
829835
unsigned int offset)
830836
{

0 commit comments

Comments
 (0)