diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-12-04 12:35:00 +0300 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-12-08 11:25:53 +0300 |
commit | ee25fba76acd8324f9de6628872c8c612a684209 (patch) | |
tree | 9133043e88c4577cd4169780bd282f0686350a29 /include/linux/gpio | |
parent | b85ea95d086471afb4ad062012a4d73cd328fa86 (diff) | |
download | linux-ee25fba76acd8324f9de6628872c8c612a684209.tar.xz |
gpiolib: provide gpiochip_dup_line_label()
gpiochip_is_requested() not only has a misleading name but it returns
a pointer to a string that is freed when the descriptor is released.
Provide a new helper meant to replace it, which returns a copy of the
label string instead.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
-rw-r--r-- | include/linux/gpio/driver.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 0aed62f0c633..5ac6dc30c547 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -532,6 +532,7 @@ struct gpio_chip { }; const char *gpiochip_is_requested(struct gpio_chip *gc, unsigned int offset); +char *gpiochip_dup_line_label(struct gpio_chip *gc, unsigned int offset); /** * for_each_requested_gpio_in_range - iterates over requested GPIOs in a given range |