Show
Ignore:
Timestamp:
02/12/04 22:55:34 (9 years ago)
Author:
khali
Message:

Fix bitmask in uch_config read and write.

Files:
1 modified

Legend:

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

    r2286 r2287  
    780780                *nrels_mag = 0; 
    781781        else if (operation == SENSORS_PROC_REAL_READ) { 
    782                 results[0] = data->uch_config; 
     782                results[0] = data->uch_config & 0x7c; 
    783783                *nrels_mag = 1; 
    784784        } else if (operation == SENSORS_PROC_REAL_WRITE) { 
    785785                if (*nrels_mag >= 1) { 
    786                         data->uch_config = results[0] & 0x7c; 
     786                        data->uch_config = (data->uch_config & 0x83)|(results[0] & 0x7c); 
    787787                        vt1211_write_value(client, VT1211_REG_UCH_CONFIG, 
    788                                            results[0] & 0x7c); 
     788                                           data->uch_config); 
    789789                } 
    790790        }