mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-29 13:28:01 +00:00
Start numbering the features at 0, not 1. There's nothing wrong with
having a feature number 0, and this makes the code slightly simpler. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4744 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
parent
75859ca9dc
commit
2a822a2d96
@ -136,7 +136,7 @@ static int sensors_read_dynamic_chip(sensors_chip_features *chip,
|
||||
}
|
||||
|
||||
/* fill in the other feature members */
|
||||
feature.data.number = i + 1;
|
||||
feature.data.number = i;
|
||||
feature.data.type = type;
|
||||
|
||||
if ((type & 0x00FF) == 0) {
|
||||
@ -145,10 +145,10 @@ static int sensors_read_dynamic_chip(sensors_chip_features *chip,
|
||||
feature.data.compute_mapping = SENSORS_NO_MAPPING;
|
||||
} else if (type & 0x10) {
|
||||
/* sub feature without compute mapping */
|
||||
feature.data.mapping = i - i % MAX_SUB_FEATURES + 1;
|
||||
feature.data.mapping = i - i % MAX_SUB_FEATURES;
|
||||
feature.data.compute_mapping = SENSORS_NO_MAPPING;
|
||||
} else {
|
||||
feature.data.mapping = i - i % MAX_SUB_FEATURES + 1;
|
||||
feature.data.mapping = i - i % MAX_SUB_FEATURES;
|
||||
feature.data.compute_mapping = feature.data.mapping;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user