diff options
| author | Richard Lyu <richard.lyu@suse.com> | 2026-03-20 11:54:52 +0800 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2026-03-26 11:25:28 +0000 |
| commit | a55e941e2283e931c8a292adc030c834f8ea0873 (patch) | |
| tree | 700a820b3d4b583cae07323309cc2de37982a734 /include/mtd/git@git.tavy.me:linux-stable.git | |
| parent | 91dc0c2a152373c4004df7e36de45190b82089ab (diff) | |
leds: lm3642: Use guard to simplify locking
The mutex_lock()/mutex_unlock() pattern requires explicitly pairing
lock and unlock calls. Use guard(mutex) instead so the lock is
automatically released when the scope exits.
Convert to guard(mutex) in lm3642_torch_brightness_set(),
lm3642_strobe_brightness_set(), and lm3642_indicator_brightness_set().
Add #include <linux/cleanup.h> to support scoped guards.
Signed-off-by: Richard Lyu <richard.lyu@suse.com>
Link: https://patch.msgid.link/20260320035451.31071-1-richard.lyu@suse.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'include/mtd/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
