[PATCH 1/2] devm-helpers: Add resource managed version of mutex init

Bartosz Golaszewski brgl at bgdev.pl
Thu Feb 22 07:11:11 PST 2024


On Thu, Feb 22, 2024 at 3:58 PM Marek Behún <kabel at kernel.org> wrote:
>
> A few drivers are doing resource-managed mutex initialization by
> implementing ad-hoc one-liner mutex dropping functions and using them
> with devm_add_action_or_reset(). Help drivers avoid these repeated
> one-liners by adding managed version of mutex initialization.
>
> Use the new function devm_mutex_init() in the following drivers:
>   drivers/gpio/gpio-pisosr.c
>   drivers/gpio/gpio-sim.c

Yes, please!

For GPIO part:

Acked-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>



More information about the linux-arm-kernel mailing list