Changeset 947

Show
Ignore:
Timestamp:
12/15/00 01:17:27 (12 years ago)
Author:
mds
Message:

(mds) fix writes to fan_div first value.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/chips/mtp008.c

    r942 r947  
    956956                        val = mtp008_read_value(client, MTP008_REG_PIN_CTRL1); 
    957957                        val = (val & 0x3f) | (data->fan_div[2] & 0x03) << 6; 
    958  
    959958                        mtp008_write_value(client, MTP008_REG_PIN_CTRL1, val); 
    960959                } 
    961                 if (*nrels_mag >= 2) { 
    962                         data->fan_div[1] = DIV_TO_REG(results[1]); 
     960                if (*nrels_mag >= 1) { 
    963961                        val = mtp008_read_value(client, MTP008_REG_VID_FANDIV); 
    964                         val = (val & 0x3f) | (data->fan_div[1] & 0x03) << 6; 
    965                 } 
    966                 if (*nrels_mag >= 2) { 
    967                         val = (val & 0xcf) | (data->fan_div[1] & 0x03) << 4; 
    968  
     962                        if (*nrels_mag >= 2) { 
     963                                data->fan_div[1] = DIV_TO_REG(results[1]); 
     964                                val = (val & 0x3f) | 
     965                                      (data->fan_div[1] & 0x03) << 6; 
     966                        } 
     967                        data->fan_div[0] = DIV_TO_REG(results[0]); 
     968                        val = (val & 0xcf) | (data->fan_div[0] & 0x03) << 4; 
    969969                        mtp008_write_value(client, MTP008_REG_VID_FANDIV, val); 
    970970                }