Re: [PATCH] staging: iio: frequency: ad9834: use guard() for mutex locking
From: Joshua Crofts
Date: Thu Jun 25 2026 - 08:47:44 EST
On Thu, 25 Jun 2026 15:04:55 +0300
Batu Ada Tutkun <batuadatutkun@xxxxxxxxx> wrote:
> @@ -17,6 +17,7 @@
> #include <linux/regulator/consumer.h>
> #include <linux/err.h>
> #include <linux/module.h>
> +#include <linux/mutex.h>
> #include <asm/div64.h>
You're definitely developing against an old tree - this won't
apply cleanly :( Please update your branch.
> #include <linux/iio/iio.h>
> @@ -152,7 +153,7 @@ static ssize_t ad9834_write(struct device *dev,
> if (ret)
> return ret;
>
> - mutex_lock(&st->lock);
> + guard(mutex)(&st->lock);
Blank line here.
> switch ((u32)this_attr->address) {
--
Kind regards
CJD