Move env_get_hex() over to the new header file. Signed-off-by: Simon Glass <s...@chromium.org> ---
arch/x86/lib/zimage.c | 1 + cmd/elf.c | 1 + common/image-fdt.c | 1 + include/common.h | 12 ------------ include/env.h | 12 ++++++++++++ 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 230b38e938..6a6258a505 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -13,6 +13,7 @@ */ #include <common.h> +#include <env.h> #include <malloc.h> #include <asm/acpi_table.h> #include <asm/io.h> diff --git a/cmd/elf.c b/cmd/elf.c index d883be4193..5e5cf47cf8 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -16,6 +16,7 @@ #include <common.h> #include <command.h> #include <elf.h> +#include <env.h> #include <environment.h> #include <net.h> #include <vxworks.h> diff --git a/common/image-fdt.c b/common/image-fdt.c index e70da3dcb3..4247dcee0c 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -11,6 +11,7 @@ #include <common.h> #include <fdt_support.h> #include <fdtdec.h> +#include <env.h> #include <errno.h> #include <image.h> #include <linux/libfdt.h> diff --git a/include/common.h b/include/common.h index 83050073bf..8d8bbc4da3 100644 --- a/include/common.h +++ b/include/common.h @@ -157,18 +157,6 @@ int do_ext2load(cmd_tbl_t *, int, int, char * const []); */ char *env_get(const char *varname); -/** - * env_get_hex() - Return an environment variable as a hex value - * - * Decode an environment as a hex number (it may or may not have a 0x - * prefix). If the environment variable cannot be found, or does not start - * with hex digits, the default value is returned. - * - * @varname: Variable to decode - * @default_val: Value to return on error - */ -ulong env_get_hex(const char *varname, ulong default_val); - /** * env_set() - set an environment variable * diff --git a/include/env.h b/include/env.h index d7190da335..dd063feb39 100644 --- a/include/env.h +++ b/include/env.h @@ -93,6 +93,18 @@ ulong env_get_ulong(const char *name, int base, ulong default_val); */ int env_set_ulong(const char *varname, ulong value); +/** + * env_get_hex() - Return an environment variable as a hex value + * + * Decode an environment as a hex number (it may or may not have a 0x + * prefix). If the environment variable cannot be found, or does not start + * with hex digits, the default value is returned. + * + * @varname: Variable to decode + * @default_val: Value to return on error + */ +ulong env_get_hex(const char *varname, ulong default_val); + /** * env_set_hex() - set an environment variable to a hex value * -- 2.22.0.709.g102302147b-goog _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot