diff options
author | Helge Deller <deller@gmx.de> | 2024-01-03 21:17:23 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-01-07 22:59:16 +0100 |
commit | 6472036581f947109b20664121db1d143e916f0b (patch) | |
tree | 71b9ac91f55d6c10954c9b102f211ff789144de4 | |
parent | 735ae74f73e55c191d48689bd11ff4a06ea0508f (diff) |
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: d0c219472980 ("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+
-rw-r--r-- | drivers/parisc/power.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index bb0d92461b08..7a6a3e7f2825 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c @@ -213,7 +213,7 @@ static int __init power_init(void) if (running_on_qemu && soft_power_reg) register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_DEFAULT, qemu_power_off, (void *)soft_power_reg); - else + if (!running_on_qemu || soft_power_reg) power_task = kthread_run(kpowerswd, (void*)soft_power_reg, KTHREAD_NAME); if (IS_ERR(power_task)) { |