PM: sleep: s2idle: Replace deprecated CPU-hotplug functions
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 3 Aug 2021 14:16:13 +0000 (16:16 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 4 Aug 2021 18:18:13 +0000 (20:18 +0200)
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>
kernel/power/suspend.c

index d8cae43..eb75f39 100644 (file)
@@ -96,7 +96,7 @@ static void s2idle_enter(void)
        s2idle_state = S2IDLE_STATE_ENTER;
        raw_spin_unlock_irq(&s2idle_lock);
 
-       get_online_cpus();
+       cpus_read_lock();
        cpuidle_resume();
 
        /* Push all the CPUs into the idle loop. */
@@ -106,7 +106,7 @@ static void s2idle_enter(void)
                    s2idle_state == S2IDLE_STATE_WAKE);
 
        cpuidle_pause();
-       put_online_cpus();
+       cpus_read_unlock();
 
        raw_spin_lock_irq(&s2idle_lock);