diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-03-30 22:29:23 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-03-30 22:29:23 -0800 |
commit | fe198b354feb31463c396376359bfd684f2910dd (patch) | |
tree | 9631e2fe3e12ca7ba225575f90ab2ede96724d91 | |
parent | 939836f95cd1e78089f92c471c20b8d915a35a7f (diff) | |
download | history-fe198b354feb31463c396376359bfd684f2910dd.tar.gz |
[PATCH] I2C: Fix Vaio EEPROM detection
This fixes a bug in the eeprom driver, which made all EEPROMs at
location 0x57 be erroneously treated as Vaio EEPROMs. I have to say I'm
quite ashamed that I introduced the bug in the first place, as this was
a really stupid one.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/i2c/chips/eeprom.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c index f126d011cfee26..cbdfa2db6f7c90 100644 --- a/drivers/i2c/chips/eeprom.c +++ b/drivers/i2c/chips/eeprom.c @@ -210,10 +210,11 @@ int eeprom_detect(struct i2c_adapter *adapter, int address, int kind) if (i2c_smbus_read_byte_data(new_client, 0x80) == 'P' && i2c_smbus_read_byte(new_client) == 'C' && i2c_smbus_read_byte(new_client) == 'G' - && i2c_smbus_read_byte(new_client) == '-') + && i2c_smbus_read_byte(new_client) == '-') { dev_info(&new_client->dev, "Vaio EEPROM detected, " "enabling password protection\n"); data->nature = VAIO; + } } /* create the sysfs eeprom file */ |