hwmon: (asus-ec-sensors) fix looping over banks while reading from EC

Do not assume there are only bank 0 and bank 1 available, just use '!='
for bank comparison.

Fixes: d0ddfd241e ("hwmon: (asus-ec-sensors) add driver for ASUS EC")
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20260711074217.554656-1-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Eugene Shalygin
2026-07-11 09:42:07 +02:00
committed by Guenter Roeck
parent af01dab0c3
commit e741d13cc2

View File

@@ -1189,7 +1189,7 @@ static int asus_ec_block_read(const struct device *dev,
}
for (ireg = 0; ireg < ec->nr_registers; ireg++) {
reg_bank = register_bank(ec->registers[ireg]);
if (reg_bank < bank) {
if (reg_bank != bank) {
continue;
}
ec_read(register_index(ec->registers[ireg]),