[PATCH v2 1/2] iio: light: vcnl4000: use correct channel array size
Tsz Shan Chan <[email protected]>
| Newsgroups | org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
vcnl4200_spec sets .channel to vcnl4040_channels but .num_channels uses ARRAY_SIZE(vcnl4000_channels). Use ARRAY_SIZE(vcnl4040_channels) so num_channels matches .channels. Both arrays have the same size. No behaviour change. Signed-off-by: Tsz Shan Chan <[email protected]> --- drivers/iio/light/vcnl4000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c index 128ae3f94074..663e623da833 100644 --- a/drivers/iio/light/vcnl4000.c +++ b/drivers/iio/light/vcnl4000.c @@ -1874,7 +1874,7 @@ static const struct vcnl4000_chip_spec vcnl4200_spec = { .measure_proximity = vcnl4200_measure_proximity, .set_power_state = vcnl4200_set_power_state, .channels = vcnl4040_channels, - .num_channels = ARRAY_SIZE(vcnl4000_channels), + .num_channels = ARRAY_SIZE(vcnl4040_channels), .info = &vcnl4040_info, .irq_thread = vcnl4040_irq_thread, .int_reg = VCNL4200_INT_FLAGS, -- 2.55.0