summaryrefslogtreecommitdiff
path: root/lib/sysfs.c
diff options
context:
space:
mode:
authorkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2007-09-23 17:42:27 +0000
committerkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2007-09-23 17:42:27 +0000
commit5958ed980dc729d34f48a977aff65f825c2ef39d (patch)
tree9b2caac62d56a84a4f44eeee5ecd23b655275307 /lib/sysfs.c
parent3d813422d76c815675ae579b8472423469d8c2c8 (diff)
downloadlm-sensors-5958ed980dc729d34f48a977aff65f825c2ef39d.tar.gz
Renumber feature and subfeature types to leave more room if we later
need to add more feature or subfeature types. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4858 7894878c-1315-0410-8ee3-d5d059ff63e0
Diffstat (limited to 'lib/sysfs.c')
-rw-r--r--lib/sysfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sysfs.c b/lib/sysfs.c
index 2a436576..a4655120 100644
--- a/lib/sysfs.c
+++ b/lib/sysfs.c
@@ -48,7 +48,7 @@ char sensors_sysfs_mount[NAME_MAX];
static
int get_type_scaling(sensors_subfeature_type type)
{
- switch (type & 0xFF10) {
+ switch (type & 0xFF80) {
case SENSORS_SUBFEATURE_IN_INPUT:
case SENSORS_SUBFEATURE_TEMP_INPUT:
return 1000;
@@ -240,8 +240,8 @@ static int sensors_read_dynamic_chip(sensors_chip_features *chip,
default:
i = (sftype >> 8) * MAX_SENSORS_PER_TYPE *
MAX_SUBFEATURES * 2 + nr * MAX_SUBFEATURES * 2 +
- ((sftype & 0x10) >> 4) * MAX_SUBFEATURES +
- (sftype & 0x0F);
+ ((sftype & 0x80) >> 7) * MAX_SUBFEATURES +
+ (sftype & 0x7F);
}
if (all_subfeatures[i].name) {
@@ -255,7 +255,7 @@ static int sensors_read_dynamic_chip(sensors_chip_features *chip,
/* fill in the subfeature members */
all_subfeatures[i].type = sftype;
all_subfeatures[i].name = strdup(name);
- if (!(sftype & 0x10))
+ if (!(sftype & 0x80))
all_subfeatures[i].flags |= SENSORS_COMPUTE_MAPPING;
if (attr->method & SYSFS_METHOD_SHOW)
all_subfeatures[i].flags |= SENSORS_MODE_R;