]> git.sur5r.net Git - u-boot/blobdiff - common/env_eeprom.c
GCC-4.x fixes: clean up global data pointer initialization for all boards.
[u-boot] / common / env_eeprom.c
index 50c623e37e32b89b4bbe9f4bab1ba95f3017b059..2adc129c67799cee1ecbf7124862d4b4a1d9a1d0 100644 (file)
@@ -32,6 +32,8 @@
 #include <environment.h>
 #include <linux/stddef.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 env_t *env_ptr = NULL;
 
 char * env_name_spec = "EEPROM";
@@ -75,8 +77,6 @@ int saveenv(void)
  */
 int env_init(void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        ulong crc, len, new;
        unsigned off;
        uchar buf[64];