msm: clock: Support multi-target compilation
Having multiple late initcalls across all the clock-$(ARCH) files
won't work when they are compiled together. Register a struct
with msm_clock_init() so that clock.c can driver the init() and
late_init() calls that need to be made per SoC.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/clock-fsm9xxx.c b/arch/arm/mach-msm/clock-fsm9xxx.c
index 52e4dfc..4a064a7 100644
--- a/arch/arm/mach-msm/clock-fsm9xxx.c
+++ b/arch/arm/mach-msm/clock-fsm9xxx.c
@@ -21,11 +21,13 @@
* Clocks
*/
-struct clk_lookup msm_clocks_fsm9xxx[] = {
+static struct clk_lookup msm_clocks_fsm9xxx[] = {
CLK_DUMMY("adm_clk", ADM0_CLK, NULL, OFF),
CLK_DUMMY("uart_clk", UART1_CLK, "msm_serial.0", OFF),
CLK_DUMMY("ce_clk", CE_CLK, NULL, OFF),
};
-unsigned msm_num_clocks_fsm9xxx = ARRAY_SIZE(msm_clocks_fsm9xxx);
-
+struct clock_init_data fsm9xxx_clock_init_data __initdata = {
+ .table = msm_clocks_fsm9xxx,
+ .size = ARRAY_SIZE(msm_clocks_fsm9xxx),
+};