Re: [PATCH v6] iio: chemical: scd30: Replace manual locking with RAII locking
From: Jonathan Cameron
Date: Wed Jun 03 2026 - 09:59:10 EST
On Sun, 31 May 2026 18:38:28 -0500
Maxwell Doose <m32285159@xxxxxxxxx> wrote:
> scd30_core.c currently uses manual mutex_lock() and mutex_unlock()
> calls. Replace them with the newer guard(mutex)() for cleaner RAII
> patterns and to improve maintainability.
>
> Add new helper function scd30_trigger_handler_helper() containing
> the critical section for scd30_trigger_handler().
>
> In addition, small refactor to replace "?:" operator with regular
> if/else returns.
>
> Signed-off-by: Maxwell Doose <m32285159@xxxxxxxxx>
Applied. Thanks,
J