Re: [PATCH] gpio: make gpio_chip_guard accept const gpio_desc
From: Bartosz Golaszewski
Date: Fri Jun 19 2026 - 04:57:39 EST
On Fri, 19 Jun 2026 10:50:36 +0200, Archit More <architmore303@xxxxxxxxx> said:
> Make gpio_chip_guard accept a const struct gpio_desc pointer,
> allowing gpiod_get_raw_value_commit() and gpiod_to_irq() to use
> the helper instead of open-coding SRCU-protected chip lookups.
>
> This removes duplicated code and eliminates the FIXME comments
> about gpio_chip_guard being unusable with const descriptors.
>
> Signed-off-by: Archit More <architmore303@xxxxxxxxx>
> ---
This was already done in commit aa7e8b7ef031 ("gpio: core: fix const-correctness
of gpio_chip_guard"). Please always base your work on top of current linux-next.
Bart