Changeset 5875 for lm-sensors/trunk/lib/sysfs.c
- Timestamp:
- 11/02/10 13:59:31 (3 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/lib/sysfs.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/lib/sysfs.c
r5874 r5875 383 383 if (sftype == SENSORS_SUBFEATURE_UNKNOWN) 384 384 continue; 385 ftype = sftype >> 8; 385 386 386 387 /* Adjust the channel number */ 387 switch ( sftype & 0xFF00) {388 case SENSORS_ SUBFEATURE_FAN_INPUT:389 case SENSORS_ SUBFEATURE_TEMP_INPUT:390 case SENSORS_ SUBFEATURE_POWER_AVERAGE:391 case SENSORS_ SUBFEATURE_ENERGY_INPUT:392 case SENSORS_ SUBFEATURE_CURR_INPUT:388 switch (ftype) { 389 case SENSORS_FEATURE_FAN: 390 case SENSORS_FEATURE_TEMP: 391 case SENSORS_FEATURE_POWER: 392 case SENSORS_FEATURE_ENERGY: 393 case SENSORS_FEATURE_CURR: 393 394 nr--; 395 break; 396 default: 394 397 break; 395 398 } … … 407 410 /* "calculate" a place to store the subfeature in our sparse, 408 411 sorted table */ 409 switch ( sftype) {410 case SENSORS_ SUBFEATURE_VID:412 switch (ftype) { 413 case SENSORS_FEATURE_VID: 411 414 i = SUB_OFFSET_OTHER + 412 ((sftype >> 8) - SENSORS_FEATURE_VID) * 413 FEATURE_TYPE_SIZE + 415 (ftype - SENSORS_FEATURE_VID) * FEATURE_TYPE_SIZE + 414 416 nr * FEATURE_SIZE + (sftype & 0xFF); 415 417 break; 416 case SENSORS_ SUBFEATURE_BEEP_ENABLE:418 case SENSORS_FEATURE_BEEP_ENABLE: 417 419 i = SUB_OFFSET_MISC + 418 ( (sftype >> 8)- SENSORS_FEATURE_BEEP_ENABLE);420 (ftype - SENSORS_FEATURE_BEEP_ENABLE); 419 421 break; 420 422 default: 421 i = (sftype >> 8)* FEATURE_TYPE_SIZE +423 i = ftype * FEATURE_TYPE_SIZE + 422 424 nr * FEATURE_SIZE + 423 425 ((sftype & 0x80) >> 7) * MAX_SUBFEATURES +
