Skip to content

Commit d2c8cce

Browse files
Sebastian Andrzej Siewiorrafaeljw
authored andcommitted
PM: sleep: s2idle: 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 <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent c500bee commit d2c8cce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/power/suspend.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static void s2idle_enter(void)
9696
s2idle_state = S2IDLE_STATE_ENTER;
9797
raw_spin_unlock_irq(&s2idle_lock);
9898

99-
get_online_cpus();
99+
cpus_read_lock();
100100
cpuidle_resume();
101101

102102
/* Push all the CPUs into the idle loop. */
@@ -106,7 +106,7 @@ static void s2idle_enter(void)
106106
s2idle_state == S2IDLE_STATE_WAKE);
107107

108108
cpuidle_pause();
109-
put_online_cpus();
109+
cpus_read_unlock();
110110

111111
raw_spin_lock_irq(&s2idle_lock);
112112

0 commit comments

Comments
 (0)