Merge branch 'pm-cpufreq-sched' into pm-cpufreq
[cascardo/linux.git] / drivers / cpufreq / intel_pstate.c
index 8b5a415..6c7cff1 100644 (file)
@@ -1242,8 +1242,6 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
 
        intel_pstate_busy_pid_reset(cpu);
 
-       cpu->update_util.func = intel_pstate_update_util;
-
        pr_debug("intel_pstate: controlling: cpu %d\n", cpunum);
 
        return 0;
@@ -1267,12 +1265,13 @@ static void intel_pstate_set_update_util_hook(unsigned int cpu_num)
 
        /* Prevent intel_pstate_update_util() from using stale data. */
        cpu->sample.time = 0;
-       cpufreq_set_update_util_data(cpu_num, &cpu->update_util);
+       cpufreq_add_update_util_hook(cpu_num, &cpu->update_util,
+                                    intel_pstate_update_util);
 }
 
 static void intel_pstate_clear_update_util_hook(unsigned int cpu)
 {
-       cpufreq_set_update_util_data(cpu, NULL);
+       cpufreq_remove_update_util_hook(cpu);
        synchronize_sched();
 }