iio: light: zopt2201: use lock guards

Use guard() and scoped_guard() to handle the mutex lock instead of
manually locking and unlocking it.

Signed-off-by: Gabriel Almeida <gabrielsousa230@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Gabriel Almeida 2026-02-17 11:31:57 -03:00 • committed by Jonathan Cameron
commit 08eea726f4