diff options
| author | Richard Lyu <richard.lyu@suse.com> | 2026-03-11 16:59:26 +0800 |
|---|---|---|
| committer | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-03-16 09:52:51 +0100 |
| commit | 8a3613898ff3b7eb9eed252f41aebcc1d7af4a31 (patch) | |
| tree | 1e467561673cff8d2ae423745f1a1ea4ed112a8c /arch/xtensa/boot/ramdisk/git@git.tavy.me:linux.git | |
| parent | 696e9ba9a3da3d919d08a1abf05c9288311858f1 (diff) | |
gpio: max732x: use guard(mutex) to simplify locking
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.
While at it: order includes alphabetically and add missing ones.
Signed-off-by: Richard Lyu <richard.lyu@suse.com>
Link: https://patch.msgid.link/20260311085924.191288-1-richard.lyu@suse.com
[Bartosz: tweak commit message, add err.h and device.h to includes]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Diffstat (limited to 'arch/xtensa/boot/ramdisk/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
