From d1fbae0933cba12c4c8d5c44ce5e368ca52bc838 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 15 Feb 2022 02:38:19 +0000 Subject: MI disable_lid_wakeups() is not needed, x86 systems can do this in sleep_resume(), which seems sensible for other future systems also --- sys/dev/acpi/acpi_x86.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/acpi/acpi_x86.c b/sys/dev/acpi/acpi_x86.c index dd7d9a54bb1..de9a7373210 100644 --- a/sys/dev/acpi/acpi_x86.c +++ b/sys/dev/acpi/acpi_x86.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_x86.c,v 1.4 2022/02/15 02:29:23 deraadt Exp $ */ +/* $OpenBSD: acpi_x86.c,v 1.5 2022/02/15 02:38:17 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -140,6 +140,8 @@ sleep_resume(void *v) { struct acpi_softc *sc = v; + acpibtn_disable_psw(); /* disable _LID for wakeup */ + /* 3rd resume AML step: _TTS(runstate) */ if (aml_node_setval(sc, sc->sc_tts, sc->sc_state) != 0) return (EINVAL); @@ -161,13 +163,6 @@ suspend_finish(void *v) acpi_addtask(sc, acpi_sleep_task, sc, sc->sc_state); } -void -disable_lid_wakeups(void *v) -{ - acpibtn_disable_psw(); /* disable _LID for wakeup */ - -} - void display_suspend(void *v) { -- cgit v1.2.3