diff options
Diffstat (limited to 'common/cmd_load.c')
-rw-r--r-- | common/cmd_load.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/common/cmd_load.c b/common/cmd_load.c index 54460cd..31fef81 100644 --- a/common/cmd_load.c +++ b/common/cmd_load.c @@ -31,6 +31,8 @@ #include <exports.h> #include <xyzModem.h> +DECLARE_GLOBAL_DATA_PTR; + #if (CONFIG_COMMANDS & CFG_CMD_LOADS) static ulong load_serial (ulong offset); static ulong load_serial_ymodem (ulong offset); @@ -54,7 +56,6 @@ int do_load_serial (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) char *env_echo; int rcode = 0; #ifdef CFG_LOADS_BAUD_CHANGE - DECLARE_GLOBAL_DATA_PTR; int load_baudrate, current_baudrate; load_baudrate = current_baudrate = gd->baudrate; @@ -214,7 +215,6 @@ load_serial (ulong offset) static int read_record (char *buf, ulong len) { - DECLARE_GLOBAL_DATA_PTR; char *p; char c; @@ -257,7 +257,6 @@ int do_save_serial (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ulong offset = 0; ulong size = 0; #ifdef CFG_LOADS_BAUD_CHANGE - DECLARE_GLOBAL_DATA_PTR; int save_baudrate, current_baudrate; save_baudrate = current_baudrate = gd->baudrate; @@ -434,8 +433,6 @@ char his_quote; /* quote chars he'll use */ int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - DECLARE_GLOBAL_DATA_PTR; - ulong offset = 0; ulong addr; int load_baudrate, current_baudrate; |