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-debug.c b/arch/arm/mach-msm/clock-debug.c
index 36bc124..d1b9ad0 100644
--- a/arch/arm/mach-msm/clock-debug.c
+++ b/arch/arm/mach-msm/clock-debug.c
@@ -115,9 +115,9 @@
static struct dentry *debugfs_base;
static u32 debug_suspend;
static struct clk_lookup *msm_clocks;
-static unsigned num_msm_clocks;
+static size_t num_msm_clocks;
-int __init clock_debug_init(struct clk_lookup *clocks, unsigned num_clocks)
+int __init clock_debug_init(struct clock_init_data *data)
{
int ret = 0;
@@ -129,8 +129,8 @@
debugfs_remove_recursive(debugfs_base);
return -ENOMEM;
}
- msm_clocks = clocks;
- num_msm_clocks = num_clocks;
+ msm_clocks = data->table;
+ num_msm_clocks = data->size;
measure = clk_get_sys("debug", "measure");
if (IS_ERR(measure)) {