commit
f51acd69 ("ols: combine demux samples") wrongly replaced the bit
pattern of 0x20 with the number of channels which just happens to be 32
as well. So, the code works but is confusing to read. Reword the
for-loop to make it more comprehensible.
Signed-off-by: Wolfram Sang <redacted>
- for (i = NUM_CHANNELS; i > 0x02; i /= 2) {
+ for (i = 0x20; i > 0x02; i >>= 1) {
if ((devc->flag_reg & i) == 0) {
num_ols_changrp++;
}
if ((devc->flag_reg & i) == 0) {
num_ols_changrp++;
}