diff options
author | Tom Rini | 2014-01-20 07:51:22 -0500 |
---|---|---|
committer | Tom Rini | 2014-01-20 07:51:22 -0500 |
commit | 55ca99f8940e230366cadd522702fac9f962e904 (patch) | |
tree | d767ca262f9d015df4b1c18aa80468a97fccdc5c /common | |
parent | 4641c211f6e37454c30770521c4de79c725036b0 (diff) | |
parent | dccacbe01968f9e682cb1dc9b7d43c831897cbec (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-i2c
Diffstat (limited to 'common')
-rw-r--r-- | common/env_eeprom.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/env_eeprom.c b/common/env_eeprom.c index 0dcdd1fc808..0db2bb63fe1 100644 --- a/common/env_eeprom.c +++ b/common/env_eeprom.c @@ -24,7 +24,6 @@ DECLARE_GLOBAL_DATA_PTR; env_t *env_ptr; char *env_name_spec = "EEPROM"; -int env_eeprom_bus = -1; static int eeprom_bus_read(unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt) @@ -40,8 +39,7 @@ static int eeprom_bus_read(unsigned dev_addr, unsigned offset, rcode = eeprom_read(dev_addr, offset, buffer, cnt); #if defined(CONFIG_I2C_ENV_EEPROM_BUS) - if (old_bus != env_eeprom_bus) - i2c_set_bus_num(old_bus); + i2c_set_bus_num(old_bus); #endif return rcode; @@ -63,6 +61,7 @@ static int eeprom_bus_write(unsigned dev_addr, unsigned offset, #if defined(CONFIG_I2C_ENV_EEPROM_BUS) i2c_set_bus_num(old_bus); #endif + return rcode; } |