#if defined(CONFIG_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
spi_read (addr, alen, buffer, len);
#else
- if (i2c_read (addr[0], addr[1], alen-1, buffer, len) != 0)
+ if (i2c_read(addr[0], offset, alen - 1, buffer, len))
rcode = 1;
#endif
buffer += len;
/* Write is enabled ... now write eeprom value.
*/
#endif
- if (i2c_write (addr[0], addr[1], alen-1, buffer, len) != 0)
+ if (i2c_write(addr[0], offset, alen - 1, buffer, len))
rcode = 1;
#endif