Skip to content

Commit 6472036

Browse files
committed
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: d0c2194 ("parisc/power: Add power soft-off when running on qemu") Signed-off-by: Helge Deller <deller@gmx.de> Cc: stable@vger.kernel.org # v6.0+
1 parent 735ae74 commit 6472036

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/parisc/power.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ static int __init power_init(void)
213213
if (running_on_qemu && soft_power_reg)
214214
register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_DEFAULT,
215215
qemu_power_off, (void *)soft_power_reg);
216-
else
216+
if (!running_on_qemu || soft_power_reg)
217217
power_task = kthread_run(kpowerswd, (void*)soft_power_reg,
218218
KTHREAD_NAME);
219219
if (IS_ERR(power_task)) {

0 commit comments

Comments
 (0)