Since ifxmips_find_board() uses chiprev to detect what board we're running on, 
we should retrieve chiprev _first_ and only then call ifxmips_find_board().

Signed-off-by: Ithamar R. Adema <ithamar.ad...@team-embedded.nl>
---
 .../linux/ifxmips/files/arch/mips/ifxmips/board.c  |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c 
b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
index 6a17f60..e6077f1 100644
--- a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
+++ b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
@@ -337,9 +337,11 @@ struct ifxmips_board *ifxmips_find_board(void)
 
 int __init ifxmips_init_devices(void)
 {
-       struct ifxmips_board *board = ifxmips_find_board();
+       struct ifxmips_board *board;
 
        chiprev = (ifxmips_r32(IFXMIPS_MPS_CHIPID) & 0x0FFFFFFF);
+       board = ifxmips_find_board();
+
        ifxmips_brn = ifxmips_find_brn_block();
 
        if (!cmdline_mac)
-- 
1.6.3.3

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to