aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/chips')
-rw-r--r--drivers/i2c/chips/eeprom.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c
index ef8a754db1db..1a7eeebac506 100644
--- a/drivers/i2c/chips/eeprom.c
+++ b/drivers/i2c/chips/eeprom.c
@@ -204,12 +204,16 @@ static int eeprom_detect(struct i2c_adapter *adapter, int address, int kind)
204 goto exit_kfree; 204 goto exit_kfree;
205 205
206 /* Detect the Vaio nature of EEPROMs. 206 /* Detect the Vaio nature of EEPROMs.
207 We use the "PCG-" prefix as the signature. */ 207 We use the "PCG-" or "VGN-" prefix as the signature. */
208 if (address == 0x57) { 208 if (address == 0x57) {
209 if (i2c_smbus_read_byte_data(new_client, 0x80) == 'P' 209 char name[4];
210 && i2c_smbus_read_byte(new_client) == 'C' 210
211 && i2c_smbus_read_byte(new_client) == 'G' 211 name[0] = i2c_smbus_read_byte_data(new_client, 0x80);
212 && i2c_smbus_read_byte(new_client) == '-') { 212 name[1] = i2c_smbus_read_byte(new_client);
213 name[2] = i2c_smbus_read_byte(new_client);
214 name[3] = i2c_smbus_read_byte(new_client);
215
216 if (!memcmp(name, "PCG-", 4) || !memcmp(name, "VGN-", 4)) {
213 dev_info(&new_client->dev, "Vaio EEPROM detected, " 217 dev_info(&new_client->dev, "Vaio EEPROM detected, "
214 "enabling privacy protection\n"); 218 "enabling privacy protection\n");
215 data->nature = VAIO; 219 data->nature = VAIO;