From f28266b7c4800d776203b73dabe3cdbb135af4c9 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 18 Jun 2007 15:32:53 +0000 Subject: [PATCH] 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 --- kernel/chips/w83627ehf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kernel/chips/w83627ehf.c b/kernel/chips/w83627ehf.c index a04bdab3..51ebb565 100644 --- a/kernel/chips/w83627ehf.c +++ b/kernel/chips/w83627ehf.c @@ -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);