aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <[email protected]>2024-01-25 09:16:01 +0100
committerBartosz Golaszewski <[email protected]>2024-02-13 11:02:53 +0100
commit2df8aa3cad407044f2febdbbdf220c6dae839c79 (patch)
tree822384a98992da6c934693a9bef5185af404003f
parentebe0c15b135b1e4092c25b95d89e9a5899467499 (diff)
gpiolib: add gpio_device_get_label() stub for !GPIOLIB
Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled. Cc: <[email protected]> Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()") Suggested-by: kernel test robot <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
-rw-r--r--include/linux/gpio/driver.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index c1df7698edb0..7f75c9a51874 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)
{