diff options
author | Liao Chang <liaochang1@huawei.com> | 2023-08-26 12:51:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-09-13 10:42:30 +0300 |
commit | 6f2b84248bab78429d5ff673e13b88b496383301 (patch) | |
tree | 908fc1e326db6f6c267c83f0b0174c821b0af646 | |
parent | 91f76271ec436e3909e1a039574f16480159b0fa (diff) | |
download | linux-6f2b84248bab78429d5ff673e13b88b496383301.tar.xz |
cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
[ Upstream commit 03997da042dac73c69e60d91942c727c76828b65 ]
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: c3274763bfc3 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/cpufreq/powernow-k8.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index d289036beff2..b10f7a1b77f1 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c @@ -1101,7 +1101,8 @@ static int powernowk8_cpu_exit(struct cpufreq_policy *pol) kfree(data->powernow_table); kfree(data); - for_each_cpu(cpu, pol->cpus) + /* pol->cpus will be empty here, use related_cpus instead. */ + for_each_cpu(cpu, pol->related_cpus) per_cpu(powernow_data, cpu) = NULL; return 0; |