Changeset 2215

Show
Ignore:
Timestamp:
01/12/04 06:21:17 (9 years ago)
Author:
mds
Message:

fix /proc magnitudes; convert temp from Kelvin to C

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r2214 r2215  
    3131               remove init and temp_type module parameters 
    3232  Module lm90: Handle hysteresis differently 
    33   Module smartbatt: Fix detection 
     33  Module smartbatt: Fix detection, magnitudes, temp 
    3434  Module w83781d: Fix negative voltages 
    3535  Module w83l785ts: New 
  • lm-sensors/trunk/kernel/chips/smartbatt.c

    r2214 r2215  
    432432        struct smartbatt_data *data = client->data; 
    433433        if (operation == SENSORS_PROC_REAL_INFO) 
    434                 *nrels_mag = 0; 
    435         else if (operation == SENSORS_PROC_REAL_READ) { 
    436                 smartbatt_update_client(client); 
    437                 results[0] = data->temp; 
     434                *nrels_mag = 1; 
     435        else if (operation == SENSORS_PROC_REAL_READ) { 
     436                smartbatt_update_client(client); 
     437                results[0] = data->temp - 2731; /* convert from Kelvin */ 
    438438                *nrels_mag = 1; 
    439439        } 
     
    445445        struct smartbatt_data *data = client->data; 
    446446        if (operation == SENSORS_PROC_REAL_INFO) 
    447                 *nrels_mag = 0; 
     447                *nrels_mag = 3; 
    448448        else if (operation == SENSORS_PROC_REAL_READ) { 
    449449                smartbatt_update_client(client); 
     
    460460        struct smartbatt_data *data = client->data; 
    461461        if (operation == SENSORS_PROC_REAL_INFO) 
    462                 *nrels_mag = 0; 
     462                *nrels_mag = 3; 
    463463        else if (operation == SENSORS_PROC_REAL_READ) { 
    464464                smartbatt_update_client(client);