[PATCH 2/2] AR7: prevent race between clock initialization and devices registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ar7_regiser_devices needs ar7_clocks_init to have been called first, however
clock.o is currently linked later due to its order in the Makefile, therefore
ar7_clocks_init always gets called later than ar7_register_devices because both
have the same initcall level. Fix this by moving ar7_register_devices to the right
initcall level.

Reported-by: Michael J. Evans <mjevans1983@xxxxxxxxx>
Signed-off-by: Florian Fainelli <florian@xxxxxxxxxxx>
---
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index 1d4a466..566f2d7 100644
--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -647,4 +647,4 @@ static int __init ar7_register_devices(void)
 
 	return 0;
 }
-arch_initcall(ar7_register_devices);
+device_initcall(ar7_register_devices);



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux