#ifndef __EEPROM_LEGACY_H
#define __EEPROM_LEGACY_H
-#ifdef CONFIG_CMD_EEPROM
+#if defined(CONFIG_CMD_EEPROM) || defined(CONFIG_ENV_IS_IN_EEPROM)
void eeprom_init(int bus);
int eeprom_read(uint dev_addr, uint offset, uchar *buffer, uint cnt);
int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt);
* some macros here so we don't have to touch every one of those uses
*/
#define eeprom_init(bus)
-#define eeprom_read(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
-#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
+#define eeprom_read(dev_addr, offset, buffer, cnt) (-ENOSYS)
+#define eeprom_write(dev_addr, offset, buffer, cnt) (-ENOSYS)
#endif
#if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) && defined(CONFIG_SYS_I2C_EEPROM_ADDR)