- for (i = 0; i <= 0x1f; i++)
- if ((i2c_smbus_read_byte_data(new_client, i * 8 + 1) != conf) ||
- (i2c_smbus_read_word_data(new_client, i * 8 + 2) != hyst) ||
- (i2c_smbus_read_word_data(new_client, i * 8 + 3) != os))
+ if (i2c_smbus_read_word_data(new_client, 4) != os
+ || i2c_smbus_read_word_data(new_client, 5) != os
+ || i2c_smbus_read_word_data(new_client, 6) != os
+ || i2c_smbus_read_word_data(new_client, 7) != os)
+ goto exit_free;
+
+ /* Unused bits */
+ if (conf & 0xe0)
+ goto exit_free;
+
+ /* Addresses cycling */
+ for (i = 8; i < 0xff; i += 8)
+ if (i2c_smbus_read_byte_data(new_client, i + 1) != conf
+ || i2c_smbus_read_word_data(new_client, i + 2) != hyst
+ || i2c_smbus_read_word_data(new_client, i + 3) != os)