Skip to content

Commit 49d6fee

Browse files
committed
cpufreq: intel_pstate: Combine ->stop_cpu() and ->offline()
Combine the ->stop_cpu() and ->offline() callback routines for intel_pstate in the active mode so as to avoid setting the ->stop_cpu callback pointer which is going to be dropped from the framework. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Viresh Kumar <[email protected]>
1 parent 3563f55 commit 49d6fee

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2532,7 +2532,7 @@ static int intel_pstate_verify_policy(struct cpufreq_policy_data *policy)
25322532
return 0;
25332533
}
25342534

2535-
static int intel_pstate_cpu_offline(struct cpufreq_policy *policy)
2535+
static int intel_cpufreq_cpu_offline(struct cpufreq_policy *policy)
25362536
{
25372537
struct cpudata *cpu = all_cpu_data[policy->cpu];
25382538

@@ -2577,11 +2577,11 @@ static int intel_pstate_cpu_online(struct cpufreq_policy *policy)
25772577
return 0;
25782578
}
25792579

2580-
static void intel_pstate_stop_cpu(struct cpufreq_policy *policy)
2580+
static int intel_pstate_cpu_offline(struct cpufreq_policy *policy)
25812581
{
2582-
pr_debug("CPU %d stopping\n", policy->cpu);
2583-
25842582
intel_pstate_clear_update_util_hook(policy->cpu);
2583+
2584+
return intel_cpufreq_cpu_offline(policy);
25852585
}
25862586

25872587
static int intel_pstate_cpu_exit(struct cpufreq_policy *policy)
@@ -2654,7 +2654,6 @@ static struct cpufreq_driver intel_pstate = {
26542654
.resume = intel_pstate_resume,
26552655
.init = intel_pstate_cpu_init,
26562656
.exit = intel_pstate_cpu_exit,
2657-
.stop_cpu = intel_pstate_stop_cpu,
26582657
.offline = intel_pstate_cpu_offline,
26592658
.online = intel_pstate_cpu_online,
26602659
.update_limits = intel_pstate_update_limits,
@@ -2956,7 +2955,7 @@ static struct cpufreq_driver intel_cpufreq = {
29562955
.fast_switch = intel_cpufreq_fast_switch,
29572956
.init = intel_cpufreq_cpu_init,
29582957
.exit = intel_cpufreq_cpu_exit,
2959-
.offline = intel_pstate_cpu_offline,
2958+
.offline = intel_cpufreq_cpu_offline,
29602959
.online = intel_pstate_cpu_online,
29612960
.suspend = intel_pstate_suspend,
29622961
.resume = intel_pstate_resume,

0 commit comments

Comments
 (0)