Re: [PATCH 4/7] iio: light: opt3001: move driver to guard(mutex)() use

From: Andy Shevchenko

Date: Mon May 11 2026 - 07:07:35 EST


On Mon, May 11, 2026 at 12:04:09PM +0200, Joshua Crofts via B4 Relay wrote:

> Move driver to use guard(mutex)() macro, to facilitate automatic
> locking/unlocking of resources. This modernizes the driver and
> improves code style.

This one LGTM,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

...

Side note for the additional patch, in case you want to address that.

> dev_err(opt->dev, "failed to read register %02x\n",
> OPT3001_CONFIGURATION);

Broken indentation.

...

> ret = i2c_smbus_write_word_swapped(opt->client, OPT3001_CONFIGURATION,
> reg);

Ditto.

...

> dev_err(opt->dev, "failed to write register %02x\n",
> OPT3001_CONFIGURATION);

Ditto.

...

There may be more, I haven't checked, but maybe we want to clean this up as
well at some point.


--
With Best Regards,
Andy Shevchenko