From f0df41dd971b8abeca4994f51159426f62c3be27 Mon Sep 17 00:00:00 2001 From: "Mark D. Studebaker" Date: Sat, 16 Dec 2000 19:28:09 +0000 Subject: [PATCH] chg addr range to 2c-2e; fix fan min writes. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@958 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/lm87.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/chips/lm87.c b/kernel/chips/lm87.c index d816c354..09867db0 100644 --- a/kernel/chips/lm87.c +++ b/kernel/chips/lm87.c @@ -48,7 +48,7 @@ /* Addresses to scan */ static unsigned short normal_i2c[] = { SENSORS_I2C_END }; -static unsigned short normal_i2c_range[] = { 0x2c, 0x2f, SENSORS_I2C_END }; +static unsigned short normal_i2c_range[] = { 0x2c, 0x2e, SENSORS_I2C_END }; static unsigned int normal_isa[] = { SENSORS_ISA_END }; static unsigned int normal_isa_range[] = { SENSORS_ISA_END }; @@ -753,7 +753,8 @@ void lm87_fan(struct i2c_client *client, int operation, int ctl_name, data->fan_min[nr-1] = FAN_TO_REG(results[0], DIV_FROM_REG (data->fan_div[nr-1])); - lm87_write_value(client, LM87_REG_FAN2_AIN2_LIMIT, + lm87_write_value(client, (nr == 2) ? + LM87_REG_FAN2_AIN2_LIMIT : LM87_REG_FAN1_AIN1_LIMIT, data->fan_min[nr-1]); } }