summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpi_pad.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpi_pad.c')
-rw-r--r--drivers/acpi/acpi_pad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index df4adeb335b2..f45979aa2d64 100644
--- a/drivers/acpi/acpi_pad.c
+++ b/drivers/acpi/acpi_pad.c
@@ -249,12 +249,12 @@ static void set_power_saving_task_num(unsigned int num)
static void acpi_pad_idle_cpus(unsigned int num_cpus)
{
- get_online_cpus();
+ cpus_read_lock();
num_cpus = min_t(unsigned int, num_cpus, num_online_cpus());
set_power_saving_task_num(num_cpus);
- put_online_cpus();
+ cpus_read_unlock();
}
static uint32_t acpi_pad_idle_cpus_num(void)