mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 16:53:20 -04:00
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:
committed by
Jonathan Cameron
parent
44f38b4629
commit
20c598e82c
@@ -128,7 +128,7 @@ struct bme680_data {
|
||||
u16 heater_temp;
|
||||
|
||||
struct {
|
||||
s32 chan[4];
|
||||
s32 chan[BME680_NUM_CHANNELS];
|
||||
aligned_s64 ts;
|
||||
} scan;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user