mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02: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:
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user