diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2007-06-26 19:41:00 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2007-06-26 19:41:00 +0000 |
commit | 08ddf77d71e13f25bf149ee3f5c2186be9d07b5e (patch) | |
tree | b8135a9df02ce224dc47b2a65571396a8c5c0e98 /target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c | |
parent | 38f683ca8545e047ca09ce4262d6839f5e38aa35 (diff) | |
download | upstream-08ddf77d71e13f25bf149ee3f5c2186be9d07b5e.tar.gz upstream-08ddf77d71e13f25bf149ee3f5c2186be9d07b5e.tar.bz2 upstream-08ddf77d71e13f25bf149ee3f5c2186be9d07b5e.zip |
[adm5120] calling of prom_detect_board is needed only when we still don't know the board
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7736 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c')
-rw-r--r-- | target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c index a288b073ca..c2e1dcbae1 100644 --- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c +++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/prom.c @@ -32,7 +32,7 @@ #include <asm/mach-adm5120/adm5120_info.h> -static char **prom_envp; +static char **prom_envp = NULL; void setup_prom_printf(int); void prom_printf(char *, ...); @@ -106,7 +106,9 @@ void __init prom_init(void) { char *cmd; - prom_envp = (char **)fw_arg2; + if ((fw_arg2 & 3) == 0) { + prom_envp = (char **)fw_arg2; + } adm5120_info_init(); |