From c9b6f93dc1525060938a0d42649938335e10e358 Mon Sep 17 00:00:00 2001 From: tobhe Date: Wed, 5 Jul 2023 08:26:56 +0000 Subject: [PATCH] Suspend from suspend_taskq in apmioctl. ok kettenis@ --- sys/arch/arm64/dev/apm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arch/arm64/dev/apm.c b/sys/arch/arm64/dev/apm.c index 13529eb4566..2ccc8229914 100644 --- a/sys/arch/arm64/dev/apm.c +++ b/sys/arch/arm64/dev/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.22 2023/02/10 14:34:16 visa Exp $ */ +/* $OpenBSD: apm.c,v 1.23 2023/07/05 08:26:56 tobhe Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -60,6 +60,7 @@ struct taskq *suspend_taskq; struct task suspend_task; void do_suspend(void *); +void suspend(void); #endif struct apm_softc { @@ -223,7 +224,7 @@ apmioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) error = EBADF; break; } - sleep_state(NULL, SLEEP_SUSPEND); + suspend(); break; #ifdef HIBERNATE case APM_IOC_HIBERNATE: -- 2.20.1