]> git.baikalelectronics.ru Git - uboot.git/commit
include/eeprom.h: fix build errors
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Tue, 18 Feb 2020 08:39:42 +0000 (08:39 +0000)
committerTom Rini <trini@konsulko.com>
Thu, 7 May 2020 13:01:42 +0000 (09:01 -0400)
commit77c241c40b8229c1a9907f54221d88d00840f5c3
tree3f44bd6192bf5703097764139f7d2a86717d20d6
parent212498e68aac324db5e477ba4e2746f5c82233dd
include/eeprom.h: fix build errors

CMD_EEPROM and ENV_IS_IN_EEPROM can be selected independently, and
cmd/eeprom.o gets built in either case, so whether to declare the real
prototypes needs to follow the same logic as whether cmd/eeprom.c is
built. Otherwise a ENV_IS_IN_EEPROM=y, CMD_EEPROM=n build fails

cmd/eeprom.c:73:1: error: expected identifier or ‘(’ before ‘{’ token
 {

While at it, fix the dummy replacements (at least assuming they are
meant to allow the code to compile) - they need to have the same type
as the expression they replace, or one gets errors such as

env/eeprom.c: In function ‘eeprom_bus_read’:
env/eeprom.c:37:8: error: void value not ignored as it ought to be
  rcode = eeprom_read(dev_addr, offset, buffer, cnt);

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Tom Rini <trini@konsulko.com>
include/eeprom.h