[PORT FROM R2] cpufreq: assign function to get freq correctly
authorRamachandra Sudarshan N <sudarshan.n.ramachandra@intel.com>
Mon, 23 Jan 2012 09:50:09 +0000 (15:20 +0530)
committerbuildbot <buildbot@intel.com>
Tue, 24 Jan 2012 12:18:32 +0000 (04:18 -0800)
BZ: 20997

The function to get the current cpu frquency was being assigned
wrongly.

Change-Id: I31468fe1ac4184abe2083429dc040262281a7f60
Signed-off-by: john mathew <john.mathew@intel.com>
Reviewed-on: http://android.intel.com:8080/32730
Reviewed-by: Hogander, Jouni <jouni.hogander@intel.com>
Tested-by: Martin, LoicX <loicx.martin@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/cpufreq/sfi-cpufreq.c

index 591d41e..688ef5c 100644 (file)
@@ -363,7 +363,6 @@ static int sfi_cpufreq_cpu_init(struct cpufreq_policy *policy)
        if (result)
                goto err_freqfree;
 
-       sfi_cpufreq_driver.get = get_cur_freq_on_cpu;
        policy->cur = get_cur_freq_on_cpu(cpu);
 
 
@@ -433,6 +432,7 @@ static struct freq_attr *sfi_cpufreq_attr[] = {
 };
 
 static struct cpufreq_driver sfi_cpufreq_driver = {
+       .get = get_cur_freq_on_cpu,
        .verify = sfi_cpufreq_verify,
        .target = sfi_cpufreq_target,
        .init = sfi_cpufreq_cpu_init,