summaryrefslogtreecommitdiff
path: root/drivers/acpi/processor_idle.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2021-08-03 16:16:12 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-08-04 20:25:54 +0200
commit95ac706744de78a93a7ec98d603c35fb21de8400 (patch)
tree34a790da9aedbcd9341fc2e93ea9b7d00bfc654f /drivers/acpi/processor_idle.c
parentc500bee1c5b2f1d59b1081ac879d73268ab0ff17 (diff)
downloadlinux-95ac706744de78a93a7ec98d603c35fb21de8400.tar.gz
ACPI: processor: Replace deprecated CPU-hotplug functions
The functions cpu_hotplug_begin, cpu_hotplug_done, get_online_cpus() and put_online_cpus() have been deprecated during the CPU hotplug rework. They map directly to cpus_write_lock(), cpus_write_unlock, 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/acpi/processor_idle.c')
-rw-r--r--drivers/acpi/processor_idle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 095c8aca141e..f37fba9e5ba0 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1301,7 +1301,7 @@ int acpi_processor_power_state_has_changed(struct acpi_processor *pr)
if (pr->id == 0 && cpuidle_get_driver() == &acpi_idle_driver) {
/* Protect against cpu-hotplug */
- get_online_cpus();
+ cpus_read_lock();
cpuidle_pause_and_lock();
/* Disable all cpuidle devices */
@@ -1330,7 +1330,7 @@ int acpi_processor_power_state_has_changed(struct acpi_processor *pr)
}
}
cpuidle_resume_and_unlock();
- put_online_cpus();
+ cpus_read_unlock();
}
return 0;