[ar7] prevent race between clocks and devices registration (#6532)
[openwrt/svn-archive/archive.git] / target / linux / ar7 / patches-2.6.32 / 130-clocks_devices_init.patch
1 commit e09dd7ae2076782c47a8b729b989e20af882415f
2 Author: Florian Fainelli <florian@openwrt.org>
3 Date: Sat May 8 16:03:34 2010 +0200
4
5 AR7: prevent race between clocks and devices initialization
6
7 ar7_clocks_init and ar7_register_devices are both called at arch_initcall
8 however, ar7_register_devices relies on clocks to be initialized, and clock.o
9 is to be linked later. Fix this by making clock.o be linked earlier.
10
11 Reported-by: Michael J. Evans <mjevans1983@gmail.com>
12 Signed-off-by: Florian Fainelli <florian@openwrt.org>
13
14 diff --git a/arch/mips/ar7/Makefile b/arch/mips/ar7/Makefile
15 index 26bc5da..2df8910 100644
16 --- a/arch/mips/ar7/Makefile
17 +++ b/arch/mips/ar7/Makefile
18 @@ -5,7 +5,7 @@ obj-y := \
19 memory.o \
20 irq.o \
21 time.o \
22 + clock.o \
23 platform.o \
24 - gpio.o \
25 - clock.o
26 + gpio.o
27 EXTRA_CFLAGS += -Werror