diff --git a/CHANGES b/CHANGES index 079c56d3..d7968513 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,7 @@ SVN HEAD Add support for the w83627ehf thermal sensor types Man page sensors.conf.5: Update the chip statement section Module i2c-nforce2: Add nForce MCP61, MCP65 support (2.6 backport) + Module lm85: Fix setting the fan speed min limit to 0 Module w83627ehf: New (2.6 backport) Programs i2cdump, i2cget, i2cset: Do not force the slave address by default Program i2cdump: Use the new I2C block read function diff --git a/kernel/chips/lm85.c b/kernel/chips/lm85.c index 4f45e892..2b65d342 100644 --- a/kernel/chips/lm85.c +++ b/kernel/chips/lm85.c @@ -186,7 +186,7 @@ static int lm85_scaling[] = { /* .001 Volts */ #define INS_FROM_REG(n,val) (INSEXT_FROM_REG(n,val,0)) /* FAN speed is measured using 90kHz clock */ -#define FAN_TO_REG(val) (SENSORS_LIMIT( (val)<=0?0: 5400000/(val),0,65534)) +#define FAN_TO_REG(val) ((val)<=0?0xffff:SENSORS_LIMIT(5400000/(val),1,65534)) #define FAN_FROM_REG(val) ((val)==0?-1:(val)==0xffff?0:5400000/(val)) /* Temperature is reported in .01 degC increments */