Skip to content

Commit 03997da

Browse files
Liao Changvireshk
authored andcommitted
cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
Since the 'cpus' field of policy structure will become empty in the cpufreq core API, it is better to use 'related_cpus' in the exit() callback of driver. Fixes: c327476 ("cpufreq: powernow-k8: Initialize per-cpu data-structures properly") Signed-off-by: Liao Chang <liaochang1@huawei.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent a3aa97b commit 03997da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/cpufreq/powernow-k8.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,8 @@ static int powernowk8_cpu_exit(struct cpufreq_policy *pol)
11011101

11021102
kfree(data->powernow_table);
11031103
kfree(data);
1104-
for_each_cpu(cpu, pol->cpus)
1104+
/* pol->cpus will be empty here, use related_cpus instead. */
1105+
for_each_cpu(cpu, pol->related_cpus)
11051106
per_cpu(powernow_data, cpu) = NULL;
11061107

11071108
return 0;

0 commit comments

Comments
 (0)