Skip to content
Snippets Groups Projects
Commit 274afbc3 authored by Baolin Wang's avatar Baolin Wang Committed by Sebastian Reichel
Browse files

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().

Signed-off-by: default avatarBaolin Wang <baolin.wang7@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 6cdd5b09
No related branches found
No related tags found
No related merge requests found
...@@ -29,10 +29,13 @@ static struct regmap *regmap; ...@@ -29,10 +29,13 @@ static struct regmap *regmap;
*/ */
static void sc27xx_poweroff_shutdown(void) static void sc27xx_poweroff_shutdown(void)
{ {
#ifdef CONFIG_PM_SLEEP_SMP #ifdef CONFIG_HOTPLUG_CPU
int cpu = smp_processor_id(); int cpu;
freeze_secondary_cpus(cpu); for_each_online_cpu(cpu) {
if (cpu != smp_processor_id())
cpu_down(cpu);
}
#endif #endif
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment