Re: [PATCH v2] gpio: max732x: use guard(mutex) to simplify locking
From: Bartosz Golaszewski
Date: Mon Mar 16 2026 - 05:16:11 EST
On Wed, 11 Mar 2026 16:59:26 +0800, Richard Lyu wrote:
> Convert the max732x driver to use the RAII-based guard(mutex) macro from
> <linux/cleanup.h>. This change replaces manual mutex_lock() and
> mutex_unlock() calls, allowing the chip lock to be managed automatically
> based on function scope.
>
> Refactor max732x_gpio_set_mask() and max732x_irq_update_mask() to
> improve code readability. This allows for direct returns and removes
> the redundant 'out' label in the set_mask function, resulting in
> cleaner and more maintainable code.
>
> [...]
Applied, thanks!
[1/1] gpio: max732x: use guard(mutex) to simplify locking
https://git.kernel.org/brgl/c/8a3613898ff3b7eb9eed252f41aebcc1d7af4a31
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>