iio: chemical: bme680: use BME680_NUM_CHANNELS for scan buffer

Use BME680_NUM_CHANNELS instead of the hardcoded channel count
in the scan buffer.

This avoids use of a magic number and improves code readability
and maintainability.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Nikhil Gautam <nikhilgtr@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Nikhil Gautam 2026-04-20 13:54:36 +05:30 committed by Jonathan Cameron
parent 44f38b4629
commit 20c598e82c

View File

@ -128,7 +128,7 @@ struct bme680_data {
u16 heater_temp;
struct {
s32 chan[4];
s32 chan[BME680_NUM_CHANNELS];
aligned_s64 ts;
} scan;