From bfc59966431e6335fd5be0589eec073902cc7bb3 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 24 Feb 2013 17:33:21 +0000 Subject: Update set_working_fdt_addr() to use setenv_addr() We might as well use this common function instead of repeating the same code. Signed-off-by: Simon Glass --- include/common.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/common.h b/include/common.h index 1d0728f..6d52924 100644 --- a/include/common.h +++ b/include/common.h @@ -358,7 +358,19 @@ int getenv_yesno(const char *var); int saveenv (void); int setenv (const char *, const char *); int setenv_ulong(const char *varname, ulong value); -int setenv_addr(const char *varname, const void *addr); +int setenv_hex(const char *varname, ulong value); +/** + * setenv_addr - Set an environment variable to an address in hex + * + * @varname: Environmet variable to set + * @addr: Value to set it to + * @return 0 if ok, 1 on error + */ +static inline int setenv_addr(const char *varname, const void *addr) +{ + return setenv_hex(varname, (ulong)addr); +} + #ifdef CONFIG_ARM # include # include -- cgit v1.1