don't corrupt 24RF08's when checksum == 1.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1522 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker committed 2002-09-07 19:16:24 +00:00
1 parent 6fa3f5df97
commit 76eeba555b
1 file changed
+2
+2
View File
@@ -224,6 +224,8 @@ int eeprom_detect(struct i2c_adapter *adapter, int address,
/* Now, we do the remaining detection. It is not there, unless you force
the checksum to work out. */
if (checksum) {
/* prevent 24RF08 corruption */
i2c_smbus_write_quick(new_client, 0);
cs = 0;
for (i = 0; i <= 0x3e; i++)
cs += i2c_smbus_read_byte_data(new_client, i);