diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-06-20 14:58:01 +0200 |
|---|---|---|
| committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-06-30 08:58:26 +0200 |
| commit | 08ad63bbd681ae4eeb50644564435035c38e5795 (patch) | |
| tree | 26a6cca3cc0c653e53bcfe42e47a7bbaff5cea5f /include/linux | |
| parent | 3315e39e5639ac770782b658e499d45f68ea7d82 (diff) | |
gpio: constify arguments of gpiod_is_equal()
This function is not meant to modify the GPIO descriptors in any way so
we can safely constify both arguments.
Link: https://lore.kernel.org/r/20250620-gpiod-is-equal-improv-v1-1-a75060505d2c@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/gpio/consumer.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index f0b1982da0cc..00df68c51405 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@ -181,7 +181,8 @@ struct gpio_desc *devm_fwnode_gpiod_get_index(struct device *dev, enum gpiod_flags flags, const char *label); -bool gpiod_is_equal(struct gpio_desc *desc, struct gpio_desc *other); +bool gpiod_is_equal(const struct gpio_desc *desc, + const struct gpio_desc *other); #else /* CONFIG_GPIOLIB */ @@ -551,7 +552,7 @@ struct gpio_desc *devm_fwnode_gpiod_get_index(struct device *dev, } static inline bool -gpiod_is_equal(struct gpio_desc *desc, struct gpio_desc *other) +gpiod_is_equal(const struct gpio_desc *desc, const struct gpio_desc *other) { WARN_ON(desc || other); return false; |
