Skip to content

Commit 2df8aa3

Browse files
krzkBartosz Golaszewski
authored andcommitted
gpiolib: add gpio_device_get_label() stub for !GPIOLIB
Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled. Cc: <stable@vger.kernel.org> Fixes: d1f7728 ("gpiolib: provide gpio_device_get_label()") Suggested-by: kernel test robot <lkp@intel.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent ebe0c15 commit 2df8aa3

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
@@ -831,6 +831,12 @@ static inline int gpio_device_get_base(struct gpio_device *gdev)
831831
return -ENODEV;
832832
}
833833

834+
static inline const char *gpio_device_get_label(struct gpio_device *gdev)
835+
{
836+
WARN_ON(1);
837+
return NULL;
838+
}
839+
834840
static inline int gpiochip_lock_as_irq(struct gpio_chip *gc,
835841
unsigned int offset)
836842
{

0 commit comments

Comments
 (0)