The compute mapping value is either SENSORS_NO_MAPPING or the same

feature number as the logical mapping. This means that the compute
mapping can be turned into a simple boolean flag. Doing so makes
struct sensors_feature_data smaller, which saves some memory (about
17 kB in my tests.)


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4758 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-09-05 08:17:22 +00:00
1 parent 87efbc06c5
commit 20c98f41b7
5 files changed
+22 -28

No files matched your search

+4 -6
View File
@@ -125,15 +125,13 @@ typedef struct sensors_bus {
files and through user functions);
number is the internal feature number, used in many functions to refer
to this feature
logical_mapping is either SENSORS_NO_MAPPING if this is feature is the
mapping is either SENSORS_NO_MAPPING if this is feature is the
main element of category; or it is the number of a feature with which
this feature is logically grouped (a group could be fan, fan_max and
fan_div)
compute_mapping is like logical_mapping, only it refers to another
feature whose compute line will be inherited (a group could be fan and
fan_max, but not fan_div)
flags is a bitfield, its value is a combination of SENSORS_MODE_R (readable)
and SENSORS_MODE_W (writable).
flags is a bitfield, its value is a combination of SENSORS_MODE_R (readable),
SENSORS_MODE_W (writable) and SENSORS_COMPUTE_MAPPING (affected by the
computation rules of the main feature).
scaling is the number of decimal points to scale by.
Divide the read value by 10**scaling to get the real value. */
typedef struct sensors_chip_feature {