ARM: relocate: Fix Thumb code by using proper label type
[platform/kernel/u-boot.git] / env / callback.c
index d539da9..638a02b 100644 (file)
@@ -6,7 +6,8 @@
 
 #include <common.h>
 #include <env.h>
-#include <environment.h>
+#include <env_internal.h>
+#include <asm/global_data.h>
 
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
 DECLARE_GLOBAL_DATA_PTR;
@@ -55,6 +56,8 @@ void env_callback_init(struct env_entry *var_entry)
                first_call = 0;
        }
 
+       var_entry->callback = NULL;
+
        /* look in the ".callbacks" var for a reference to this variable */
        if (callback_list != NULL)
                ret = env_attr_lookup(callback_list, var_name, callback_name);
@@ -98,7 +101,7 @@ static int set_callback(const char *name, const char *value, void *priv)
        e.key   = name;
        e.data  = NULL;
        e.callback = NULL;
-       hsearch_r(e, FIND, &ep, &env_htab, 0);
+       hsearch_r(e, ENV_FIND, &ep, &env_htab, 0);
 
        /* does the env variable actually exist? */
        if (ep != NULL) {