[U-Boot] [PATCH] i2c_eeprom: include <linux/err.h> to fix build error

Simon Glass sjg at chromium.org
Thu Dec 18 14:18:08 CET 2014


On 18 December 2014 at 04:00, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
> drivers/misc/i2c_eeprom.c fails to build unless CONFIG_FIT_SIGNATURE
> is defined.
>
>   CC      drivers/misc/i2c_eeprom.o
> drivers/misc/i2c_eeprom.c: In function 'i2c_eeprom_read':
> drivers/misc/i2c_eeprom.c:15:10: error: 'ENODEV' undeclared
> (first use in this function)
> drivers/misc/i2c_eeprom.c:15:10: note: each undeclared identifier
> is reported only once for each function it appears in
> drivers/misc/i2c_eeprom.c: In function 'i2c_eeprom_write':
> drivers/misc/i2c_eeprom.c:21:10: error: 'ENODEV' undeclared
> (first use in this function)
> drivers/misc/i2c_eeprom.c:22:1: warning: control reaches end of
> non-void function [-Wreturn-type]
> drivers/misc/i2c_eeprom.c: In function 'i2c_eeprom_read':
> drivers/misc/i2c_eeprom.c:16:1: warning: control reaches end of
> non-void function [-Wreturn-type]
> make[2]: *** [drivers/misc/i2c_eeprom.o] Error 1
> make[1]: *** [drivers/misc] Error 2
> make: *** [drivers] Error 2
>
> By the way, Sandbox (enabling CONFIG_FIT_SIGNATURE) is luckily
> working depending on it.
> Sandbox includes include/asm-generic/errno.h
>             from include/errno.h
>             from include/u-boot/rsa-checksum.h
>             from include/image.h
>             from include/common.h
>             from drivers/misc/i2c_eeprom.c
>
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
> ---
>
>  drivers/misc/i2c_eeprom.c | 1 +
>  1 file changed, 1 insertion(+)

Thanks!

Acked-by: Simon Glass <sjg at chromium.org>

Regards,
Simon


More information about the U-Boot mailing list