Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gpio-device-get-label-for-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel

gpiolib: provide gpio_device_get_label()

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

+15
+14
drivers/gpio/gpiolib.c
··· 255 255 EXPORT_SYMBOL_GPL(gpio_device_get_base); 256 256 257 257 /** 258 + * gpio_device_get_label() - Get the label of this GPIO device 259 + * @gdev: GPIO device 260 + * 261 + * Returns: 262 + * Pointer to the string containing the GPIO device label. The string's 263 + * lifetime is tied to that of the underlying GPIO device. 264 + */ 265 + const char *gpio_device_get_label(struct gpio_device *gdev) 266 + { 267 + return gdev->label; 268 + } 269 + EXPORT_SYMBOL(gpio_device_get_label); 270 + 271 + /** 258 272 * gpio_device_get_chip() - Get the gpio_chip implementation of this GPIO device 259 273 * @gdev: GPIO device 260 274 *
+1
include/linux/gpio/driver.h
··· 786 786 787 787 /* struct gpio_device getters */ 788 788 int gpio_device_get_base(struct gpio_device *gdev); 789 + const char *gpio_device_get_label(struct gpio_device *gdev); 789 790 790 791 #else /* CONFIG_GPIOLIB */ 791 792