Skip to content

Commit c94195a

Browse files
committed
openrisc: Use do_kernel_power_off()
After commit 14c5678 ("power: reset: syscon-poweroff: Use devm_register_sys_off_handler(POWER_OFF)") setting up of pm_power_off was removed from the driver, this causes OpenRISC platforms using syscon-poweroff to no longer shutdown. The kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. All architectures have moved away from using pm_power_off except OpenRISC. This patch migrates openrisc to use do_kernel_power_off() instead of the legacy pm_power_off(). Fixes: 14c5678 ("power: reset: syscon-poweroff: Use devm_register_sys_off_handler(POWER_OFF)") Signed-off-by: Stafford Horne <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]>
1 parent 4cece76 commit c94195a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

arch/openrisc/kernel/process.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void machine_restart(char *cmd)
6565
}
6666

6767
/*
68-
* This is used if pm_power_off has not been set by a power management
68+
* This is used if a sys-off handler was not set by a power management
6969
* driver, in this case we can assume we are on a simulator. On
7070
* OpenRISC simulators l.nop 1 will trigger the simulator exit.
7171
*/
@@ -89,10 +89,8 @@ void machine_halt(void)
8989
void machine_power_off(void)
9090
{
9191
printk(KERN_INFO "*** MACHINE POWER OFF ***\n");
92-
if (pm_power_off != NULL)
93-
pm_power_off();
94-
else
95-
default_power_off();
92+
do_kernel_power_off();
93+
default_power_off();
9694
}
9795

9896
/*

0 commit comments

Comments
 (0)