Commit 64720365 authored by Helge Deller's avatar Helge Deller

parisc/power: Fix power soft-off button emulation on qemu

Make sure to start the kthread to check the power button on qemu as
well if the power button address was provided.
This fixes the qemu built-in system_powerdown runtime command.

Fixes: d0c21947 ("parisc/power: Add power soft-off when running on qemu")
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v6.0+
parent 735ae74f
...@@ -213,7 +213,7 @@ static int __init power_init(void) ...@@ -213,7 +213,7 @@ static int __init power_init(void)
if (running_on_qemu && soft_power_reg) if (running_on_qemu && soft_power_reg)
register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_DEFAULT, register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_DEFAULT,
qemu_power_off, (void *)soft_power_reg); qemu_power_off, (void *)soft_power_reg);
else if (!running_on_qemu || soft_power_reg)
power_task = kthread_run(kpowerswd, (void*)soft_power_reg, power_task = kthread_run(kpowerswd, (void*)soft_power_reg,
KTHREAD_NAME); KTHREAD_NAME);
if (IS_ERR(power_task)) { if (IS_ERR(power_task)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment