On Sat, Nov 25, 2023 at 11:26:23PM +0100, Marek Vasut wrote: > The ISL76682 is very basic ALS which only supports ALS or IR mode > in four ranges, 1k/4k/16k/64k LUX. There is no IRQ support or any > other fancy functionality. ... > + for (i = 0; i < ARRAY_SIZE(isl76682_range_table); i++) { > + if (chan->type == IIO_LIGHT && val2 != isl76682_range_table[i].als) > + continue; > + if (chan->type == IIO_INTENSITY && val2 != isl76682_range_table[i].ir) > + continue; You forgot to drop indentation level for 'continue' lines. > + scoped_guard(mutex, &chip->lock) > + chip->range = isl76682_range_table[i].range; > + return 0; > + } -- With Best Regards, Andy Shevchenko