diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2021-08-03 16:16:11 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-08-04 20:16:32 +0200 |
commit | 09681a0772f773dddffd3c2d1796c87bd0d903b9 (patch) | |
tree | 031585f25b44c3b92fbe1726b6f99d28e5cd3c6e /drivers/cpufreq/powernow-k8.c | |
parent | c500bee1c5b2f1d59b1081ac879d73268ab0ff17 (diff) | |
download | linux-stable-09681a0772f773dddffd3c2d1796c87bd0d903b9.tar.gz linux-stable-09681a0772f773dddffd3c2d1796c87bd0d903b9.tar.bz2 linux-stable-09681a0772f773dddffd3c2d1796c87bd0d903b9.zip |
cpufreq: Replace deprecated CPU-hotplug functions
The functions get_online_cpus() and put_online_cpus() have been
deprecated during the CPU hotplug rework. They map directly to
cpus_read_lock() and cpus_read_unlock().
Replace deprecated CPU-hotplug functions with the official version.
The behavior remains unchanged.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/powernow-k8.c')
-rw-r--r-- | drivers/cpufreq/powernow-k8.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index b9ccb6a3dad9..12ab4014af71 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c @@ -1180,7 +1180,7 @@ static int powernowk8_init(void) if (!x86_match_cpu(powernow_k8_ids)) return -ENODEV; - get_online_cpus(); + cpus_read_lock(); for_each_online_cpu(i) { smp_call_function_single(i, check_supported_cpu, &ret, 1); if (!ret) @@ -1188,10 +1188,10 @@ static int powernowk8_init(void) } if (supported_cpus != num_online_cpus()) { - put_online_cpus(); + cpus_read_unlock(); return -ENODEV; } - put_online_cpus(); + cpus_read_unlock(); ret = cpufreq_register_driver(&cpufreq_amd64_driver); if (ret) |