Changeset 5021

Show
Ignore:
Timestamp:
11/16/07 10:08:44 (1 year ago)
Author:
khali
Message:

Recognize VGN as a valid Sony Vaio name prefix. This is a backport from
Linux 2.6.

Files:

Legend:

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

    r5020 r5021  
    77  Module eeprom: Hide Sony Vaio serial numbers to regular users (2.6 backport) 
    88                 Drop useless debugging log messages 
     9                 Recognize VGN as a valid Sony Vaio name prefix (2.6 backport) 
    910  Program decode-dimms.pl: Fix DDR2 SDRAM module speed decoding 
    1011                           Update manufacturer IDs. 
  • lm-sensors/trunk/kernel/chips/eeprom.c

    r5020 r5021  
    201201 
    202202        /* Detect the Vaio nature of EEPROMs. 
    203            We use the "PCG-" prefix as the signature. */ 
     203           We use the "PCG-" or "VGN-" prefix as the signature. */ 
    204204        if (address == 0x57) { 
    205                 if (i2c_smbus_read_byte_data(new_client, 0x80) == 'P' 
    206                  && i2c_smbus_read_byte(new_client) == 'C' 
    207                  && i2c_smbus_read_byte(new_client) == 'G' 
    208                  && i2c_smbus_read_byte(new_client) == '-') { 
     205                char name[4]; 
     206 
     207                name[0] = i2c_smbus_read_byte_data(new_client, 0x80); 
     208                name[1] = i2c_smbus_read_byte(new_client); 
     209                name[2] = i2c_smbus_read_byte(new_client); 
     210                name[3] = i2c_smbus_read_byte(new_client); 
     211 
     212                if (!memcmp(name, "PCG-", 4) || !memcmp(name, "VGN-", 4)) { 
    209213                        printk(KERN_INFO "Vaio EEPROM detected, " 
    210214                               "enabling privacy protection\n");