mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
FROMGIT: power: reset: sc27xx: Change to use cpu_down()
To allow the SC27XX driver can be built as a module, and the freeze_secondary_cpus() symbol is not exported, thus we can change to use the exported cpu_down() API to shut down other cpus to avoid racing, which is same as the freeze_secondary_cpus(). bug: 146864653 Signed-off-by: Baolin Wang <baolin.wang7@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> (cherry picked from commit 274afbc3ad33136962d66447e89d02e3c142a30a https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next)
This commit is contained in:
parent
3a2e32d2a4
commit
072cc0324b
1 changed files with 6 additions and 3 deletions
|
|
@ -29,10 +29,13 @@ static struct regmap *regmap;
|
|||
*/
|
||||
static void sc27xx_poweroff_shutdown(void)
|
||||
{
|
||||
#ifdef CONFIG_PM_SLEEP_SMP
|
||||
int cpu = smp_processor_id();
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
int cpu;
|
||||
|
||||
freeze_secondary_cpus(cpu);
|
||||
for_each_online_cpu(cpu) {
|
||||
if (cpu != smp_processor_id())
|
||||
cpu_down(cpu);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue