From: Tim Gardner Date: Mon, 28 Apr 2014 16:18:18 +0000 (-0600) Subject: cpufreq: ppc-corenet-cpufreq: Fix __udivdi3 modpost error X-Git-Tag: next-20140430~59^2^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6712d2931933;p=karo-tx-linux.git cpufreq: ppc-corenet-cpufreq: Fix __udivdi3 modpost error bfa709bc823fc32ee8dd5220d1711b46078235d8 (cpufreq: powerpc: add cpufreq transition latency for FSL e500mc SoCs) introduced a modpost error: ERROR: "__udivdi3" [drivers/cpufreq/ppc-corenet-cpufreq.ko] undefined! make[1]: *** [__modpost] Error 1 Fix this by avoiding 64 bit integer division. gcc version 4.8.2 Fixes: bfa709bc823f (cpufreq: powerpc: add cpufreq transition latency for FSL e500mc SoCs) Signed-off-by: Tim Gardner Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c index a1ca3dd04a8e..0af618abebaf 100644 --- a/drivers/cpufreq/ppc-corenet-cpufreq.c +++ b/drivers/cpufreq/ppc-corenet-cpufreq.c @@ -138,6 +138,7 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) struct cpufreq_frequency_table *table; struct cpu_data *data; unsigned int cpu = policy->cpu; + u64 transition_latency_hz; np = of_get_cpu_node(cpu, NULL); if (!np) @@ -205,8 +206,10 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) for_each_cpu(i, per_cpu(cpu_mask, cpu)) per_cpu(cpu_data, i) = data; + transition_latency_hz = 12ULL * NSEC_PER_SEC; policy->cpuinfo.transition_latency = - (12ULL * NSEC_PER_SEC) / fsl_get_sys_freq(); + do_div(transition_latency_hz, fsl_get_sys_freq()); + of_node_put(np); return 0;