mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-07 16:01:34 +00:00
Optimizations: we don't need to initialize fan_min values, and we don't
need to call w83627ehf_update_client() for disabled fans. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4457 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
106eb3a3e1
commit
f28266b7c4
1 file changed
+1
-6
@@ -625,8 +625,8 @@ static void w83627ehf_fan(struct i2c_client *client, int operation,
|
||||
if (operation == SENSORS_PROC_REAL_INFO)
|
||||
*nrels_mag = 0;
|
||||
else if (operation == SENSORS_PROC_REAL_READ) {
|
||||
w83627ehf_update_client(client);
|
||||
if (data->has_fan & (1 << nr)) {
|
||||
w83627ehf_update_client(client);
|
||||
results[0] = fan_from_reg(data->fan_min[nr],
|
||||
div_from_reg(data->fan_div[nr]));
|
||||
results[1] = fan_from_reg(data->fan[nr],
|
||||
@@ -979,11 +979,6 @@ static int w83627ehf_detect(struct i2c_adapter *adapter, int address,
|
||||
|
||||
w83627ehf_init_client(client);
|
||||
|
||||
/* A few vars need to be filled upon startup */
|
||||
for (i = 0; i < 5; i++)
|
||||
data->fan_min[i] = w83627ehf_read_value(client,
|
||||
W83627EHF_REG_FAN_MIN[i]);
|
||||
|
||||
/* Read VID value */
|
||||
superio_enter();
|
||||
superio_select(W83627EHF_LD_HWM);
|
||||
|
||||
Reference in new issue
Block a user