Changeset 4557

Show
Ignore:
Timestamp:
07/05/07 22:44:31 (1 year ago)
Author:
khali
Message:

lm85: Fix setting the fan speed min limit to 0.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/CHANGES

    r4541 r4557  
    1515  Man page sensors.conf.5: Update the chip statement section 
    1616  Module i2c-nforce2: Add nForce MCP61, MCP65 support (2.6 backport) 
     17  Module lm85: Fix setting the fan speed min limit to 0 
    1718  Module w83627ehf: New (2.6 backport) 
    1819  Programs i2cdump, i2cget, i2cset: Do not force the slave address by default 
  • lm-sensors/trunk/kernel/chips/lm85.c

    r4327 r4557  
    187187 
    188188/* FAN speed is measured using 90kHz clock */ 
    189 #define FAN_TO_REG(val)  (SENSORS_LIMIT( (val)<=0?0: 5400000/(val),0,65534)) 
     189#define FAN_TO_REG(val)  ((val)<=0?0xffff:SENSORS_LIMIT(5400000/(val),1,65534)) 
    190190#define FAN_FROM_REG(val) ((val)==0?-1:(val)==0xffff?0:5400000/(val)) 
    191191